Message ID | c3a8ae220797e71c74df32fc6fed7fcf3ccdcac1.1643901334.git.fweimer@redhat.com |
---|---|
State | New |
Headers | show |
Series | Predictable ELF destructor ordering | expand |
diff --git a/elf/dl-init.c b/elf/dl-init.c index deefeb099a..cfeb28a2a7 100644 --- a/elf/dl-init.c +++ b/elf/dl-init.c @@ -25,6 +25,10 @@ static void 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 function pointers are invalid in this case. (Executables do not need relocation, and neither do proxy objects.) */