This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
speed ppc_elf_relax_section
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Mon, 10 Aug 2009 16:59:49 +0930
- Subject: speed ppc_elf_relax_section
Stops some useless rummaging through relocations in data sections.
* elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.265
diff -u -p -r1.265 elf32-ppc.c
--- bfd/elf32-ppc.c 10 Aug 2009 06:14:04 -0000 1.265
+++ bfd/elf32-ppc.c 10 Aug 2009 07:18:48 -0000
@@ -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;
--
Alan Modra
Australia Development Lab, IBM