This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug target/16007] Use of static template members results in broken executables


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-07-07 13:35 -------
Ian, I think the cleanest fix is to teach gas to set the SHT_NOBITS type on the
.gnu.linkonce.b* sections, like on the .bss section.  Would the following patch
be sufficient?

Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.232
diff -u -p -r1.232 elf.c
--- elf.c       28 Jun 2004 13:57:58 -0000      1.232
+++ elf.c       7 Jul 2004 13:24:42 -0000
@@ -2045,6 +2045,7 @@ bfd_section_from_elf_index (bfd *abfd, u
 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 },

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16007


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