Fix powerpc ELF section flags

Alan Modra amodra@bigpond.net.au
Mon Oct 24 11:11:00 GMT 2005


On Mon, Oct 24, 2005 at 02:02:15PM +0930, Alan Modra wrote:
> Fixes a bug exposed by HJ's new ELF group objcopy test.
> 
> 	* elf32-ppc.c (ppc_elf_fake_sections): Don't set SHF_EXCLUDE on
> 	group sections.

Ditto for i370-linux.

	* elf32-i370.c (i370_elf_fake_sections): Likewise.

Index: bfd/elf32-i370.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i370.c,v
retrieving revision 1.50
diff -u -p -r1.50 elf32-i370.c
--- bfd/elf32-i370.c	18 Aug 2005 01:28:22 -0000	1.50
+++ bfd/elf32-i370.c	24 Oct 2005 11:11:14 -0000
@@ -379,7 +379,7 @@ i370_elf_fake_sections (bfd *abfd ATTRIB
 			Elf_Internal_Shdr *shdr,
 			asection *asect)
 {
-  if ((asect->flags & SEC_EXCLUDE) != 0)
+  if ((asect->flags & (SEC_GROUP | SEC_EXCLUDE)) == SEC_EXCLUDE)
     shdr->sh_flags |= SHF_EXCLUDE;
 
   if ((asect->flags & SEC_SORT_ENTRIES) != 0)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list