mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-27 04:41:02 +08:00
elf: Do not run constructors for proxy objects
Otherwise, the ld.so constructor runs for each audit namespace
and each dlmopen namespace.
(cherry picked from commit f6c8204fd7
)
This commit is contained in:
parent
b6c7135576
commit
f33ffef089
@ -25,10 +25,14 @@
|
|||||||
static void
|
static void
|
||||||
call_init (struct link_map *l, int argc, char **argv, char **env)
|
call_init (struct link_map *l, int argc, char **argv, char **env)
|
||||||
{
|
{
|
||||||
|
/* Do not run constructors for proxy objects. */
|
||||||
|
if (l != l->l_real)
|
||||||
|
return;
|
||||||
|
|
||||||
/* If the object has not been relocated, this is a bug. The
|
/* If the object has not been relocated, this is a bug. The
|
||||||
function pointers are invalid in this case. (Executables do not
|
function pointers are invalid in this case. (Executables do not
|
||||||
need relocation, and neither do proxy objects.) */
|
need relocation.) */
|
||||||
assert (l->l_real->l_relocated || l->l_real->l_type == lt_executable);
|
assert (l->l_relocated || l->l_type == lt_executable);
|
||||||
|
|
||||||
if (l->l_init_called)
|
if (l->l_init_called)
|
||||||
/* This object is all done. */
|
/* This object is all done. */
|
||||||
|
Loading…
Reference in New Issue
Block a user