[v2,2/3] elf: Do not run constructors for proxy objects
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
Commit Message
Otherwise, the ld.so constructor runs for each audit namespace
and each dlmopen namespace.
---
v2: New patch.
elf/dl-init.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -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.) */