This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linker stumbles over non-grouped .text/.rodata for a C++ function
- From: Ian Lance Taylor <iant at google dot com>
- To: Stephan Bergmann <stephan dot bergmann dot secondary at googlemail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 31 Aug 2011 13:07:55 -0700
- Subject: Re: Linker stumbles over non-grouped .text/.rodata for a C++ function
- References: <7B454F3C-2C07-4499-8D25-9432F30A1542@googlemail.com>
Stephan Bergmann <stephan.bergmann.secondary@googlemail.com> writes:
> I am trying to track down an error that can at least be observed when building recent versions of LibreOffice (e.g., revision bf3ff35d8c96315c35cf8dc8495be4b488b55cb6 of git://anongit.freedesktop.org/libreoffice/core) on Fedora 15 i386 (i.e., with GCC 4.6.0 20110603 (Red Hat 4.6.0-10)). The problem is that linking together objects via
>
>> g++ -shared vbarange.o vbasheetobjects.o
>
>
> fails with errors like
>
>> `.L109' referenced in section `.rodata._ZN19ScVbaCollectionBaseIN4cppu15WeakImplHelper1IN3ooo3vba11XCollectionEEEE4ItemERKN3com3sun4star3uno3AnyESD_[ScVbaCollectionBase<cppu::WeakImplHelper1<ooo::vba::XCollection> >::Item(com::sun::star::uno::Any const&, com::sun::star::uno::Any const&)]' of vbasheetobjects.o: defined in discarded section `.text._ZN19ScVbaCollectionBaseIN4cppu15WeakImplHelper1IN3ooo3vba11XCollectionEEEE4ItemERKN3com3sun4star3uno3AnyESD_[non-virtual thunk to ScVbaCollectionBase<cppu::WeakImplHelper1<ooo::vba::XCollection> >::Item(com::sun::star::uno::Any const&, com::sun::star::uno::Any const&)]' of vbasheetobjects.o
This sounds like a compiler bug. You are correct that the .text and
.rodata sections should be using the same section group. Please file a
bug report so it is not forgotten.
That said, this message from the linker is a warning, and you can
normally ignore it.
Ian