mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
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.
This commit is contained in:
committed by
Ulrich Drepper
parent
5306d3613a
commit
3a56ea2673
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user