about summary refs log tree commit diff
path: root/src/internal
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-11-11 12:30:24 -0500
committerRich Felker <dalias@aerifal.cx>2016-11-11 12:46:06 -0500
commitb418ea1b66d0d5a08640d4edf3b65d4619c6ef7f (patch)
treef4b2a1cc89e1c5fce77fd13cd0821eb2178c1f25 /src/internal
parent4078a5c31fa67987051c2180db7a07702534032f (diff)
downloadmusl-b418ea1b66d0d5a08640d4edf3b65d4619c6ef7f.tar.gz
musl-b418ea1b66d0d5a08640d4edf3b65d4619c6ef7f.tar.xz
musl-b418ea1b66d0d5a08640d4edf3b65d4619c6ef7f.zip
generalize ELF hash table types not to assume 32-bit entries
alpha and s390x gratuitously use 64-bit entries (wasting 2x space and
cache utilization) despite the values always being 32-bit.

based on patch by Bobby Bingham, with changes suggested by Alexander
Monakov to use the public Elf_Symndx type from link.h (and make it
properly variable by arch) rather than adding new internal
infrastructure for handling the type.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/vdso.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/internal/vdso.c b/src/internal/vdso.c
index 6ae0212e..a4862171 100644
--- a/src/internal/vdso.c
+++ b/src/internal/vdso.c
@@ -1,4 +1,5 @@
 #include <elf.h>
+#include <link.h>
 #include <limits.h>
 #include <stdint.h>
 #include <string.h>
@@ -57,7 +58,7 @@ void *__vdsosym(const char *vername, const char *name)
 
 	char *strings = 0;
 	Sym *syms = 0;
-	uint32_t *hashtab = 0;
+	Elf_Symndx *hashtab = 0;
 	uint16_t *versym = 0;
 	Verdef *verdef = 0;