public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: libc-alpha@sourceware.org
Subject: [PATCH] aarch64: Avoid hidden symbols for memcpy/memmove into static binaries
Date: Thu, 30 Nov 2017 11:26:00 -0000	[thread overview]
Message-ID: <1512041196-14726-1-git-send-email-siddhesh@sourceware.org> (raw)

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

             reply	other threads:[~2017-11-30 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 11:26 Siddhesh Poyarekar [this message]
2017-12-04 12:44 ` [PING][PATCH] " Siddhesh Poyarekar
2017-12-04 13:12   ` Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1512041196-14726-1-git-send-email-siddhesh@sourceware.org \
    --to=siddhesh@sourceware.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).