aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-02-22 16:30:30 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-02-22 16:30:30 -0800
commit1a6e6083b69dcb695e175b5dc02342391da6ba22 (patch)
tree82f8ce09deeea4934beb9f1605235bb0fc6c27e9 /bfd/elflink.c
parent13cfdc88044a1fd0934e9cc7d1b0cd04d7a8fd62 (diff)
downloadgdb-1a6e6083b69dcb695e175b5dc02342391da6ba22.zip
gdb-1a6e6083b69dcb695e175b5dc02342391da6ba22.tar.gz
gdb-1a6e6083b69dcb695e175b5dc02342391da6ba22.tar.bz2
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.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index c7672ed..89a6dea 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -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;