From bc58236c652761240fbe52f946f4a5efdd503fab Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 29 Mar 2010 15:13:53 -0700 Subject: Handle platforms without aux vector --- elf/rtld.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'elf/rtld.c') diff --git a/elf/rtld.c b/elf/rtld.c index 3afb997..3c41446 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 { -- cgit v1.1