mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] x86/vdso: Emit a GNU hash
@ 2015-08-06 21:45 Andy Lutomirski
  2015-08-06 22:52 ` Andy Lutomirski
  2015-08-09 10:25 ` [tip:x86/asm] " tip-bot for Andy Lutomirski
  0 siblings, 2 replies; 7+ messages in thread
From: Andy Lutomirski @ 2015-08-06 21:45 UTC (permalink / raw)
  To: x86, linux-kernel
  Cc: Nathan Lynch, Isaac Dunham, Rich Felker, musl, Andy Lutomirski

From: Andy Lutomirski <luto@amacapital.net>

Some dynamic loaders may be slightly faster if a GNU hash is
available.  Strangely, this seems to have no effect at all on the
vdso size.

This is unlikely to have any measurable effect on the time it takes
to resolve vdso symbols (since there are so few of them).  In some
contexts, it can be a win for a different reason: if every DSO has a
GNU hash section, then libc can avoid calculating SysV hashes at
all.  Both musl and glibc appear to have this optimization.

It's plausible that this breaks some ancient glibc version.  If so,
then, depending on what glibc versions break, we could either
require COMPAT_VDSO for them or consider reverting.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
---

For review.  I'll add it to my (currently empty) 4.3 pull request if
people like it, unless Ingo feels like adding it to -tip directly.

 arch/x86/entry/vdso/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index e97032069f88..20f3ac53148d 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -175,7 +175,7 @@ quiet_cmd_vdso = VDSO    $@
 		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
 		 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
 
-VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \
+VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=both) \
 	$(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS)
 GCOV_PROFILE := n
 
-- 
2.4.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-09 10:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 21:45 [PATCH] x86/vdso: Emit a GNU hash Andy Lutomirski
2015-08-06 22:52 ` Andy Lutomirski
2015-08-07  0:48   ` [PATCH] tile/vdso: emit a GNU hash as well Chris Metcalf
2015-08-07  7:02   ` [PATCH] s390/vdso: emit a GNU hash Martin Schwidefsky
2015-08-07 16:10   ` [PATCH] x86/vdso: Emit " Nathan Lynch
2015-08-07 18:13     ` Andy Lutomirski
2015-08-09 10:25 ` [tip:x86/asm] " tip-bot for Andy Lutomirski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).