Always create dynsym section with dynamic sections

We should always create the dynsym section, even if it is empty, with
dynamic sections.

	* elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
	dynsym section, even if it is empty, with dynamic sections.
This commit is contained in:
H.J. Lu 2016-02-22 16:30:30 -08:00
parent 13cfdc8804
commit 1a6e6083b6
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
dynsym section, even if it is empty, with dynamic sections.
2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
* syms.c: Remove BSF_COMMON from comments.

View File

@ -875,9 +875,9 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd,
&dynsymcount);
/* There is an unused NULL entry at the head of the table which
we must account for in our count. Unless there weren't any
symbols, which means we'll have no table at all. */
if (dynsymcount != 0)
we must account for in our count. We always create the dynsym
section, even if it is empty, with dynamic sections. */
if (elf_hash_table (info)->dynamic_sections_created)
++dynsymcount;
elf_hash_table (info)->dynsymcount = dynsymcount;