This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc 2.18 freeze!


On 11-06-2013 15:30, Roland McGrath wrote:
>> I'd like also to add http://sourceware.org/ml/libc-alpha/2013-05/msg00878.html
> We should have a BZ item to refer to about that issue.  Please file one and
> then repost your patch with the BZ# in the log entry.  I'd also like to see
> a GCC bug filed about getting a proper solution to that, perhaps along with
> the other issue that came up about compiler-emitted calls from __builtin_*
> calls polluting the name space.
>
>
> Thanks,
> Roland
>
I opened http://sourceware.org/bugzilla/show_bug.cgi?id=15605 to track it and updated
patch is below. My patch however only fixes the check-localplt issue I observed in
PPC32/PPC64 builds with GCC 4.8 + O3. The issue reported at 
 <http://sourceware.org/ml/libc-alpha/2013-05/msg00730.html>http://sourceware.org/ml/libc-alpha/2013-05/msg00730.html needs another solution.

---

2013-06-11  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	[BZ #15605]
	* sysdeps/generic/symbol-hacks.h: Add workaround for memset/memmove calls
	generated by the compiler on loop optimizations.
	* sysdeps/wordsize-32/symbol-hacks.h: Include next symbol-hacks.h for
	general definitions.

--

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index bc7b4c4..9eaf014 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -1 +1,6 @@
-/* Fortunately nothing to do.  */
+/* Some compiler optimizations may transform loops into memset/memmove
+   calls and without proper declaration it may generate PLT calls.  */
+#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
+asm ("memmove = __GI_memmove");
+asm ("memset = __GI_memset");
+#endif
diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h
index 52ac5c1..202a807 100644
--- a/sysdeps/wordsize-32/symbol-hacks.h
+++ b/sysdeps/wordsize-32/symbol-hacks.h
@@ -16,6 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */

+#include_next "symbol-hacks.h"
+
 /* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
    __moddi3, and __umoddi3.  These functions are exported and
    therefore we get PLTs.  Unnecessarily so.  Changing gcc is a big


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]