[Bug c++/16625] Discarded Linkonce sections in .rodata
hjl at lucon dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 2 19:43:00 GMT 2007
------- Comment #35 from hjl at lucon dot org 2007-03-02 19:43 -------
(In reply to comment #34)
> Could the be related to
> http://sources.redhat.com/ml/binutils/2004-08/msg00187.html?
>
> I'm getting those linker errors with both gcc 4.1.1 and gcc 4.1.2 on
> x86-Solaris with GNU ld from binutils-070227, but only when compiling with -O2
> or -O3, but not with -O0.
>
> The referenced symbols shows up (gnm -a *.o) in several objects like this:
>
> 0000000000000000 t .gnu.linkonce.t._ZN10otl_streamlsEj
> 0000000000000000 W _ZN10otl_streamlsEj
>
> But in the object mentioned in the error messages like this:
>
> 0000000000000000 r .gnu.linkonce.r._ZN10otl_streamlsEj
> 0000000000000000 t .gnu.linkonce.t._ZN10otl_streamlsEj
> 0000000000000000 W _ZN10otl_streamlsEj
>
> One possible workaround is to reorder the objects during link, so that those
> with .gnu.linkonce.r.* come first.
>
> If this a compiler or a linker bug? (I'd blame the linker ;))
>
It is most likely a Solaris specific compiler bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625
More information about the Gcc-bugs
mailing list