This is the mail archive of the
mailing list for the glibc project.
Re: [PING][PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: siddhesh at sourceware dot org, libc-alpha at sourceware dot org
- Cc: nd at arm dot com
- Date: Mon, 04 Dec 2017 13:12:43 +0000
- Subject: Re: [PING][PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <firstname.lastname@example.org> <email@example.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 04/12/17 12:44, Siddhesh Poyarekar wrote:
> On Thursday 30 November 2017 04:56 PM, Siddhesh Poyarekar wrote:
>> The __GI_* symbol aliases for __memcpy_generic are unnecessary since
>> they're never used. Add them only for libc.so to avoid PLT.
>> +# ifdef SHARED
>> /* It doesn't make sense to send libc-internal memcpy calls through a PLT. */
>> .globl __GI_memcpy; __GI_memcpy = __memcpy_generic
>> .globl __GI_memmove; __GI_memmove = __memmove_generic
>> +# endif
OK to commit.
i was thinking that some existing macro from
libc-symbols.h would be better, since those already
deal with the #ifdef SHARED (and other cases)
hidden_ver (__memcpy_generic, memcpy)
happens to do the right thing, but it's probably
an abuse of that macro.. and it seems we already
do similar things in other asm files (which means
the libc-symbols.h macros are not that useful..).