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.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index c613f82..1d134dd 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -26,11 +26,12 @@
static inline void __attribute__ ((unused))
elf_get_dynamic_info (ElfW(Dyn) *dyn,
- ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_EXTRANUM])
+ ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM
+ + DT_EXTRANUM])
{
unsigned int i;
- for (i = 0; i < DT_NUM + DT_PROCNUM + DT_EXTRANUM; ++i)
+ for (i = 0; i < DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM; ++i)
info[i] = NULL;
if (! dyn)
@@ -43,8 +44,11 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn,
else if (dyn->d_tag >= DT_LOPROC &&
dyn->d_tag < DT_LOPROC + DT_PROCNUM)
info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
+ else if ((Elf32_Word) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
+ info[DT_VERSIONTAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM] = dyn;
else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
- info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM] = dyn;
+ info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM
+ + DT_VERSIONTAGNUM] = dyn;
else
assert (! "bad dynamic tag");
dyn++;