aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-tilegx.c18
2 files changed, 14 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7d7bf58..2d1af3a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
+ * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
+ this_hdr.sh_entsize only if section size > 0.
+
+2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
+
* elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index a413fb6..b83adc8 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -4313,10 +4313,10 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd,
entry size. */
pad_size = PLT_ENTRY_SIZE - PLT_HEADER_SIZE - PLT_TAIL_SIZE;
memset (splt->contents + splt->size - pad_size, 0, pad_size);
- }
- elf_section_data (splt->output_section)->this_hdr.sh_entsize
- = PLT_ENTRY_SIZE;
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ = PLT_ENTRY_SIZE;
+ }
}
if (htab->elf.sgotplt)
@@ -4337,10 +4337,10 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd,
TILEGX_ELF_PUT_WORD (htab, output_bfd, (bfd_vma) 0,
htab->elf.sgotplt->contents
+ GOT_ENTRY_SIZE (htab));
- }
- elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize =
- GOT_ENTRY_SIZE (htab);
+ elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize =
+ GOT_ENTRY_SIZE (htab);
+ }
}
if (htab->elf.sgot)
@@ -4354,10 +4354,10 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd,
0);
TILEGX_ELF_PUT_WORD (htab, output_bfd, val,
htab->elf.sgot->contents);
- }
- elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize =
- GOT_ENTRY_SIZE (htab);
+ elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize =
+ GOT_ENTRY_SIZE (htab);
+ }
}
return TRUE;