diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-04-26 03:53:07 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-26 03:53:23 -0700 |
commit | d5486c43728b4fa17c111a301c30a1e072eaec6a (patch) | |
tree | 96cb133ef999247bd33465209ac67f2e90acaeed /bfd/elf-bfd.h | |
parent | 3283f4fb4c772f21d2c5f0091569ffcfc7eb6dec (diff) | |
download | gdb-d5486c43728b4fa17c111a301c30a1e072eaec6a.zip gdb-d5486c43728b4fa17c111a301c30a1e072eaec6a.tar.gz gdb-d5486c43728b4fa17c111a301c30a1e072eaec6a.tar.bz2 |
Always count the NULL entry in dynamic symbol table
There is an unused NULL entry at the head of dynamic symbol table which
we must account for in our count even if the table is empty or unused
since it is intended for the mandatory DT_SYMTAB tag (.dynsym section)
in .dynamic section.
* elf-bfd.h (elf_link_hash_table): Update comments for
dynsymcount.
* elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
the unused NULL entry at the head of dynamic symbol table.
(bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
checks.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 5dce70e..7447629 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -520,8 +520,8 @@ struct elf_link_hash_table union gotplt_union init_got_offset; union gotplt_union init_plt_offset; - /* The number of symbols found in the link which must be put into - the .dynsym section. */ + /* The number of symbols found in the link which is intended for the + mandatory DT_SYMTAB tag (.dynsym section) in .dynamic section. */ bfd_size_type dynsymcount; /* The string table of dynamic symbols, which becomes the .dynstr |