aboutsummaryrefslogtreecommitdiff
path: root/elf/dynamic-link.h
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dynamic-link.h')
-rw-r--r--elf/dynamic-link.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index bdd297e..7edac41 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -118,6 +118,10 @@ elf_get_dynamic_info (struct link_map *l)
? (info[DT_INIT_ARRAYSZ]->d_un.d_val
/ sizeof (ElfW(Addr)))
: 0);
+ l->l_preinitcount = (info[DT_PREINIT_ARRAY]
+ ? (info[DT_PREINIT_ARRAYSZ]->d_un.d_val
+ / sizeof (ElfW(Addr)))
+ : 0);
if (info[DT_RUNPATH] != NULL)
/* If both RUNPATH and RPATH are given, the latter is ignored. */
info[DT_RPATH] = NULL;