This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] More fixes for unsafe compiler optimization
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 29 Apr 2014 16:22:13 -0300
- Subject: [PATCH] More fixes for unsafe compiler optimization
- Authentication-results: sourceware.org; auth=none
GCC 4.9 -ftree-loop-distribute-patterns now may transform loops in
memcpy. Add the alias to internal GLIBC symbol to avoid PLT creation.
This fixes the check-localplt issues when building GLIBC with GCC 4.9
on powerpc64. Ok to apply?
--
* sysdeps/generic/symbol-hacks.h (memcpy): Add internal alias.
---
diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 9eaf014..6bec24b 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -3,4 +3,5 @@
#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
asm ("memmove = __GI_memmove");
asm ("memset = __GI_memset");
+asm ("memcpy = __GI_memcpy");
#endif