[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible Linker Bug with static template member on Solaris
From: |
Ian Lance Taylor |
Subject: |
Re: Possible Linker Bug with static template member on Solaris |
Date: |
15 Jun 2004 12:02:00 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Axel Habermann <address@hidden> writes:
> >Perhaps. Certainly the assembler should not set the CONTENTS or LOAD
> >flags. I don't know if there a way for the compiler to tell the
> >assembler this when using the Solaris syntax for the .section
> >pseudo-op. What does the Solaris assembler do with this input? Does
> >it set the section type to SHT_NOBITS or SHT_PROGBITS?
> >
> >
> Section Header[511]: sh_name:
> .gnu.linkonce.b._ZN19InternalNotificatorI12ChangeRecordE14notificatorMapE
> sh_addr: 0 sh_flags: [ SHF_WRITE SHF_ALLOC ]
> sh_size: 0x4 sh_type: [ SHT_PROGBITS ]
> sh_offset: 0x68398 sh_entsize: 0
> sh_link: 0 sh_info: 0
> sh_addralign: 0x4
So, it doesn't work with the Solaris assembler either. Ergo, it is a
compiler bug.
I think the question is: how can the compiler use Solaris .section
syntax to tell the assembler to use SHT_NOBITS for this section? I
don't know what the answer is. The documentation for .section in the
Solaris assembler manual:
http://docs.sun.com/db/doc/816-1681/6m83631kt?q=SPARC+assembler+manual&a=view
doesn't suggest anything.
We can fix this for gas by making it recognize ".gnu.linkonce.b*"
specially. But the code will still break with the Solaris assembler.
So I think this is still a compiler bug: the compiler must avoid
.gnu.linkonce.b* on Solaris.
I recommend that you file a compiler bug report. See
http://gcc.gnu.org/bugs.html
Let me know if you do that, and I'll add some comments if
appropriate.
Ian