This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2007 14:40:04 -0000
- Subject: [Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section
- References: <bug-33871-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #31 from hjl at lucon dot org 2007-11-04 14:40 -------
(In reply to comment #30)
> Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in
> discarded section
>
> On 03/11/2007, at 7:21 AM, hjl at lucon dot org wrote:
>
> > Local symbols should only be referenced within the same comdat group
> > or the linkonce section. Otherwise, it is a compiler bug.
>
> How do you represent, in ELF, a string which should be present in the
> executable only once, but which need not have a globally visible name?
>
You can put it in a comdat group. But you should only reference it from the
same comdat group. A comdat group is a set of sections which have the
same signature.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871