diff mbox

More fixes for unsafe compiler optimization

Message ID 535FFBE5.1080805@linux.vnet.ibm.com
State New
Headers show

Commit Message

Adhemerval Zanella April 29, 2014, 7:22 p.m. UTC
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.

---

Comments

Carlos O'Donell April 29, 2014, 8:34 p.m. UTC | #1
On 04/29/2014 03:22 PM, Adhemerval Zanella wrote:
> 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
> 

Looks good to me. I was surprised we didn't already list memcpy.

c.
diff mbox

Patch

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