summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-08-10 07:24:33 +0000
committerAlan Modra <amodra@gmail.com>2009-08-10 07:24:33 +0000
commita8ad78a74eb4e3bf77cf6174e5c10a3c30212b3a (patch)
tree5d85c217b9d37809f4e8152f0d8128b6758fe8ac /bfd
parent * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt (diff)
downloadbinutils-gdb-a8ad78a74eb4e3bf77cf6174e5c10a3c30212b3a.tar.gz
binutils-gdb-a8ad78a74eb4e3bf77cf6174e5c10a3c30212b3a.tar.bz2
binutils-gdb-a8ad78a74eb4e3bf77cf6174e5c10a3c30212b3a.zip
* elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf32-ppc.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8d103cd9458..cc9850c4af7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
2009-08-10 Alan Modra <amodra@bigpond.net.au>
+ * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
+
+2009-08-10 Alan Modra <amodra@bigpond.net.au>
+
* elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
info for STT_GNU_IFUNC.
* elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 542928d4d42..292503945c0 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -5905,8 +5905,9 @@ ppc_elf_relax_section (bfd *abfd,
*again = FALSE;
/* Nothing to do if there are no relocations, and no need to do
- anything with non-alloc sections. */
+ anything with non-alloc or non-code sections. */
if ((isec->flags & SEC_ALLOC) == 0
+ || (isec->flags & SEC_CODE) == 0
|| (isec->flags & SEC_RELOC) == 0
|| isec->reloc_count == 0)
return TRUE;