diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2010-01-15 09:09:35 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-01-15 09:09:35 -0800 |
commit | 3a56ea26730755076cb5bc1d07727c7a4fcb8fd7 (patch) | |
tree | 37a1e680e8b1e9301e7e7493a64e776f72e7df93 /elf/dl-open.c | |
parent | 5306d3613a3e71d8ede6529e858e2398223ac3da (diff) | |
download | glibc-3a56ea26730755076cb5bc1d07727c7a4fcb8fd7.tar.gz glibc-3a56ea26730755076cb5bc1d07727c7a4fcb8fd7.tar.xz glibc-3a56ea26730755076cb5bc1d07727c7a4fcb8fd7.zip |
ld.so: Adjust the auxv if ld.so is directly invoked.
If a binary gets invoked by passing it as argument to ld.so the stack still holds the auxiliary vector of ld.so when entering the _start routine of the executable. So the invocation via ld.so is not fully transparent to the executable. This causes problems if the executable wants to scan the auxv itself.
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r-- | elf/dl-open.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c index e920c7738c..754a263fa1 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -1,5 +1,5 @@ /* Load a shared object at runtime, relocate it, and run its initializer. - Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc. + Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,7 +40,8 @@ extern ElfW(Addr) _dl_sysdep_start (void **start_argptr, void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phnum, - ElfW(Addr) *user_entry)); + ElfW(Addr) *user_entry, + ElfW(auxv_t) *auxv)); weak_extern (BP_SYM (_dl_sysdep_start)) extern int __libc_multiple_libcs; /* Defined in init-first.c. */ @@ -346,8 +347,8 @@ dl_open_worker (void *a) { /* If this here is the shared object which we want to profile make sure the profile is started. We can find out whether - this is necessary or not by observing the `_dl_profile_map' - variable. If was NULL but is not NULL afterwars we must + this is necessary or not by observing the `_dl_profile_map' + variable. If was NULL but is not NULL afterwars we must start the profiling. */ struct link_map *old_profile_map = GL(dl_profile_map); |