speed ppc_elf_relax_section

Alan Modra amodra@bigpond.net.au
Mon Aug 10 07:30:00 GMT 2009


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



More information about the Binutils mailing list