#include <elf.h>
+#include <link.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>
size_t i;
for (i=0; libc.auxv[i] != AT_SYSINFO_EHDR; i+=2)
if (!libc.auxv[i]) return 0;
+ if (!libc.auxv[i+1]) return 0;
Ehdr *eh = (void *)libc.auxv[i+1];
Phdr *ph = (void *)((char *)eh + eh->e_phoff);
size_t *dynv=0, base=-1;
char *strings = 0;
Sym *syms = 0;
- uint32_t *hashtab = 0;
+ Elf_Symndx *hashtab = 0;
uint16_t *versym = 0;
Verdef *verdef = 0;