* [PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries
@ 2017-11-30 11:26 Siddhesh Poyarekar
2017-12-04 12:44 ` [PING][PATCH] " Siddhesh Poyarekar
0 siblings, 1 reply; 3+ messages in thread
From: Siddhesh Poyarekar @ 2017-11-30 11:26 UTC (permalink / raw)
To: libc-alpha
The __GI_* symbol aliases for __memcpy_generic are unnecessary since
they're never used. Add them only for libc.so to avoid PLT.
* sysdeps/aarch64/multiarch/memcpy_generic.S (__GI_memcpy):
Define only for libc.so.
---
sysdeps/aarch64/multiarch/memcpy_generic.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sysdeps/aarch64/multiarch/memcpy_generic.S b/sysdeps/aarch64/multiarch/memcpy_generic.S
index 041a779..edb2e52 100644
--- a/sysdeps/aarch64/multiarch/memcpy_generic.S
+++ b/sysdeps/aarch64/multiarch/memcpy_generic.S
@@ -33,9 +33,11 @@
# undef libc_hidden_builtin_def
# define libc_hidden_builtin_def(name)
+# 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
#endif
--
2.7.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PING][PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries
2017-11-30 11:26 [PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries Siddhesh Poyarekar
@ 2017-12-04 12:44 ` Siddhesh Poyarekar
2017-12-04 13:12 ` Szabolcs Nagy
0 siblings, 1 reply; 3+ messages in thread
From: Siddhesh Poyarekar @ 2017-12-04 12:44 UTC (permalink / raw)
To: libc-alpha
Ping?
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.
>
> * sysdeps/aarch64/multiarch/memcpy_generic.S (__GI_memcpy):
> Define only for libc.so.
> ---
> sysdeps/aarch64/multiarch/memcpy_generic.S | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sysdeps/aarch64/multiarch/memcpy_generic.S b/sysdeps/aarch64/multiarch/memcpy_generic.S
> index 041a779..edb2e52 100644
> --- a/sysdeps/aarch64/multiarch/memcpy_generic.S
> +++ b/sysdeps/aarch64/multiarch/memcpy_generic.S
> @@ -33,9 +33,11 @@
> # undef libc_hidden_builtin_def
> # define libc_hidden_builtin_def(name)
>
> +# 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
>
> #endif
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PING][PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries
2017-12-04 12:44 ` [PING][PATCH] " Siddhesh Poyarekar
@ 2017-12-04 13:12 ` Szabolcs Nagy
0 siblings, 0 replies; 3+ messages in thread
From: Szabolcs Nagy @ 2017-12-04 13:12 UTC (permalink / raw)
To: siddhesh, libc-alpha; +Cc: nd
On 04/12/17 12:44, Siddhesh Poyarekar wrote:
> Ping?
>
> 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)
i think
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..).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-04 13:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 11:26 [PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries Siddhesh Poyarekar
2017-12-04 12:44 ` [PING][PATCH] " Siddhesh Poyarekar
2017-12-04 13:12 ` Szabolcs Nagy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).