This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix powerpc ELF section flags


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.

Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.181
diff -u -p -r1.181 elf32-ppc.c
--- bfd/elf32-ppc.c	6 Oct 2005 19:21:14 -0000	1.181
+++ bfd/elf32-ppc.c	24 Oct 2005 04:30:25 -0000
@@ -1856,7 +1856,7 @@ ppc_elf_fake_sections (bfd *abfd ATTRIBU
 		       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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]