All architectures have AT_SYSINFO_EHDR now.

Bug: N/A
Test: builds
Change-Id: Ibc894be98ed0781c8b991ffadff34f616b934aa7
This commit is contained in:
Elliott Hughes 2017-09-22 09:29:29 -07:00
parent 6e6e1abb89
commit c51a404b1a
2 changed files with 0 additions and 7 deletions

View file

@ -53,7 +53,6 @@ int dl_iterate_phdr(int (*cb)(struct dl_phdr_info* info, size_t size, void* data
exe_info.dlpi_phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<uintptr_t>(ehdr) + ehdr->e_phoff);
exe_info.dlpi_phnum = ehdr->e_phnum;
#if defined(AT_SYSINFO_EHDR)
// Try the executable first.
int rc = cb(&exe_info, sizeof(exe_info), data);
if (rc != 0) {
@ -79,8 +78,4 @@ int dl_iterate_phdr(int (*cb)(struct dl_phdr_info* info, size_t size, void* data
}
}
return cb(&vdso_info, sizeof(vdso_info), data);
#else
// There's only the executable to try.
return cb(&exe_info, sizeof(exe_info), data);
#endif
}

View file

@ -26,8 +26,6 @@
#include <unistd.h>
#include "private/KernelArgumentBlock.h"
#define AT_SYSINFO_EHDR 33 /* until we have new enough uapi headers... */
int clock_gettime(int clock_id, timespec* tp) {
auto vdso_clock_gettime = reinterpret_cast<decltype(&clock_gettime)>(
__libc_globals->vdso[VDSO_CLOCK_GETTIME].fn);