diff options
author | Thomas Schwinge <thomas@schwinge.name> | 2010-03-29 15:13:53 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-03-29 15:13:53 -0700 |
commit | bc58236c652761240fbe52f946f4a5efdd503fab (patch) | |
tree | d79c5b44f766d8506e1d1b25e71914940e9403b8 /elf/rtld.c | |
parent | 8f4a5048eea6536ee85c0f2670adbb97d71e427d (diff) | |
download | glibc-bc58236c652761240fbe52f946f4a5efdd503fab.tar glibc-bc58236c652761240fbe52f946f4a5efdd503fab.tar.gz glibc-bc58236c652761240fbe52f946f4a5efdd503fab.tar.bz2 glibc-bc58236c652761240fbe52f946f4a5efdd503fab.zip |
Handle platforms without aux vector
Diffstat (limited to 'elf/rtld.c')
-rw-r--r-- | elf/rtld.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/rtld.c b/elf/rtld.c index 3afb997f85..3c414461e9 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -928,8 +928,6 @@ dl_main (const ElfW(Phdr) *phdr, if (*user_entry == (ElfW(Addr)) ENTRY_POINT) { - ElfW(auxv_t) *av; - /* Ho ho. We are not the program interpreter! We are the program itself! This means someone ran ld.so as a command. Well, that might be convenient to do sometimes. We support it by @@ -1086,9 +1084,10 @@ of this helper program; chances are you did not intend to run this program.\n\ main_map->l_name = (char *) ""; *user_entry = main_map->l_entry; +#ifdef HAVE_AUX_VECTOR /* Adjust the on-stack auxiliary vector so that it looks like the binary was executed directly. */ - for (av = auxv; av->a_type != AT_NULL; av++) + for (ElfW(auxv_t) *av = auxv; av->a_type != AT_NULL; av++) switch (av->a_type) { case AT_PHDR: @@ -1101,6 +1100,7 @@ of this helper program; chances are you did not intend to run this program.\n\ av->a_un.a_val = *user_entry; break; } +#endif } else { |