This is the mail archive of the binutils@sources.redhat.com 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]

Type of .gnu.linkonce.b.* sections on Solaris


Hi,

.gnu.linkonce.b.* sections are problematic on Solaris, as analyzed in the GCC 
PR http://gcc.gnu.org/PR16007, because they have the SHT_PROGBITS type by 
default and GCC has no way to override it with the Solaris assembler syntax.

Following Ian's suggestion, this patch teaches gas to treat them like .bss.* 
sections.  Built and tested on sparc-sun-solaris2.8.

Ok for mainline?


BFD:

2004-07-15  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.


-- 
Eric Botcazou
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.233
diff -u -r1.233 elf.c
--- bfd/elf.c	9 Jul 2004 16:06:20 -0000	1.233
+++ bfd/elf.c	15 Jul 2004 07:54:11 -0000
@@ -2045,6 +2045,7 @@
 static struct bfd_elf_special_section const special_sections[] =
 {
   { ".bss",            4, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
+  { ".gnu.linkonce.b",15, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
   { ".comment",        8,  0, SHT_PROGBITS, 0 },
   { ".data",           5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".data1",          6,  0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },

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