This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.17-796-g6a97b62


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  6a97b62a5b4f18aea849d6f4d8de58d1469d2521 (commit)
      from  94f2c076692a5a4beaa9a85eb10dbe4d891acb1e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a97b62a5b4f18aea849d6f4d8de58d1469d2521

commit 6a97b62a5b4f18aea849d6f4d8de58d1469d2521
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Wed Jun 12 10:21:22 2013 -0500

    Fix unsafe compiler optimization
    
    GCC 4.8 enables -ftree-loop-distribute-patterns at -O3 by default and
    this optimization may transform loops into memset/memmove calls. Without
    proper handling this may generate unexpected PLT calls on GLIBC.
    This patch fixes by create memset/memmove alias to internal GLIBC
    __GI_memset/__GI_memmove symbols.

diff --git a/ChangeLog b/ChangeLog
index d38c96a..d08f0a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
 2013-06-12  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/bug-nextafter.c: Include <math-tests.h>.
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

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                          |    8 ++++++++
 sysdeps/generic/symbol-hacks.h     |    7 ++++++-
 sysdeps/wordsize-32/symbol-hacks.h |    2 ++
 3 files changed, 16 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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