x86/vdso: Emit a GNU hash

Just one change: the eponymous GNU hash addition.
x86/vdso: Emit a GNU hash

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.

Link: https://lkml.kernel.org/r/fd56cc057a2d62ab31c56a48d04fccb435b3fd4f.1438897382.git.luto@kernel.org
Cc: Nathan Lynch <nathan_lynch@mentor.com>
Cc: Isaac Dunham <ibid.ag@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
1 file changed