aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-11-19 06:32:35 +0000
committerAlan Modra <amodra@gmail.com>2002-11-19 06:32:35 +0000
commitcdcf6e38a2691f0e76cf70b0d421ed5f15d30d02 (patch)
tree5eb6a34235d64d3464333723091779fbb62cba85 /bfd
parent82eeeb9451dceed04a4d10f701097d1b92e223e2 (diff)
downloadgdb-cdcf6e38a2691f0e76cf70b0d421ed5f15d30d02.zip
gdb-cdcf6e38a2691f0e76cf70b0d421ed5f15d30d02.tar.gz
gdb-cdcf6e38a2691f0e76cf70b0d421ed5f15d30d02.tar.bz2
* elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
rel_hdr.sh_size too.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-ppc.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7269ae0..b25ed5b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
+ rel_hdr.sh_size too.
+
2002-11-18 Klee Dienes <kdienes@apple.com>
* Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 384348e..e437427 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3866,6 +3866,11 @@ ppc64_elf_edit_opd (obfd, info)
sec->_cooked_size = wptr - sec->contents;
sec->reloc_count = write_rel - relstart;
+ /* Fudge the size too, as this is used later in
+ elf_bfd_final_link if we are emitting relocs. */
+ elf_section_data (sec)->rel_hdr.sh_size
+ = sec->reloc_count * elf_section_data (sec)->rel_hdr.sh_entsize;
+ BFD_ASSERT (elf_section_data (sec)->rel_hdr2 == NULL);
}
else if (elf_section_data (sec)->relocs != relstart)
free (relstart);