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: [PATCH] More fixes for unsafe compiler optimization


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.


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