This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/16007] Use of static template members results in broken executables
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2004 13:35:36 -0000
- Subject: [Bug target/16007] Use of static template members results in broken executables
- References: <20040615165859.16007.kiwi@xtradyne.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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