This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] More fixes for unsafe compiler optimization
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 29 Apr 2014 16:34:43 -0400
- Subject: Re: [PATCH] More fixes for unsafe compiler optimization
- Authentication-results: sourceware.org; auth=none
- References: <535FFBE5 dot 1080805 at linux dot vnet dot ibm dot com>
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.