summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-08-24 22:16:41 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-08-24 22:16:41 +0000
commit7bf9d995937aaa1dd251dc0b6b362066ddbe33b8 (patch)
tree41e542e196deab306a9786e487801e4529bf17b5 /bfd
parent9a23c3d6b2383859606dfb7eec68bba23a65cccb (diff)
downloadgdb-7bf9d995937aaa1dd251dc0b6b362066ddbe33b8.tar.gz
* elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
set GOT's entry size if there is no ELF section data. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elf32-tilepro.c5
-rw-r--r--bfd/elf64-s390.c5
-rw-r--r--bfd/elfxx-sparc.c7
4 files changed, 18 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6e34cc75f20..cc4d7fdc735 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2013-08-24 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
+ set GOT's entry size if there is no ELF section data.
+ * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections):
+ Likewise.
+
2013-08-23 H.J. Lu <hongjiu.lu@intel.com>
* elf64-x86-64.c (get_elf_x86_64_arch_data): New.
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 62b95536478..c36da2bee24 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -3909,8 +3909,9 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd,
PLT_ENTRY_SIZE - PLT_HEADER_SIZE);
}
- elf_section_data (splt->output_section)->this_hdr.sh_entsize
- = PLT_ENTRY_SIZE;
+ if (elf_section_data (splt->output_section) != NULL)
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ = PLT_ENTRY_SIZE;
}
if (htab->elf.sgotplt)
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 75413e03a9f..3aea98ce765 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3692,8 +3692,9 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
- htab->elf.splt->output_section->vma - 6)/2,
htab->elf.splt->contents + 8);
}
- elf_section_data (htab->elf.splt->output_section)
- ->this_hdr.sh_entsize = PLT_ENTRY_SIZE;
+ if (elf_section_data (htab->elf.splt->output_section) != NULL)
+ elf_section_data (htab->elf.splt->output_section)->this_hdr.sh_entsize
+ = PLT_ENTRY_SIZE;
}
if (htab->elf.sgotplt)
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index ba001056af9..94da3600a82 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -4793,9 +4793,10 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i
}
}
- elf_section_data (splt->output_section)->this_hdr.sh_entsize
- = (htab->is_vxworks || !ABI_64_P (output_bfd))
- ? 0 : htab->plt_entry_size;
+ if (elf_section_data (splt->output_section) != NULL)
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize
+ = ((htab->is_vxworks || !ABI_64_P (output_bfd))
+ ? 0 : htab->plt_entry_size);
}
/* Set the first entry in the global offset table to the address of