aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-06-25 12:12:43 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-06-25 13:04:07 -0700
commit946748d5ed1d218adfccd523be9fdf280adfe434 (patch)
tree040d6f09bf3475a8c09d58b1e8ade54297b49d9e /bfd/elf.c
parentbf7b9cd9aa4645119792e9d1689e0f014f43934f (diff)
downloadgdb-946748d5ed1d218adfccd523be9fdf280adfe434.zip
gdb-946748d5ed1d218adfccd523be9fdf280adfe434.tar.gz
gdb-946748d5ed1d218adfccd523be9fdf280adfe434.tar.bz2
Don't set sh_size for .shstrtab twice
_bfd_elf_assign_file_positions_for_non_load will set the sh_size field for .shstrtab section. There is need to initialize it in _bfd_elf_compute_section_file_positions. * elf.c (_bfd_elf_compute_section_file_positions): Don't initialize sh_size for .shstrtab here.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 4020961..9846046 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3772,7 +3772,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd,
shstrtab_hdr->sh_type = SHT_STRTAB;
shstrtab_hdr->sh_flags = 0;
shstrtab_hdr->sh_addr = 0;
- shstrtab_hdr->sh_size = _bfd_elf_strtab_size (elf_shstrtab (abfd));
+ /* sh_size is set in _bfd_elf_assign_file_positions_for_non_load. */
shstrtab_hdr->sh_entsize = 0;
shstrtab_hdr->sh_link = 0;
shstrtab_hdr->sh_info = 0;