Query - GNU 2.17 ld

Alan Modra amodra@bigpond.net.au
Thu Jun 21 07:33:00 GMT 2007


On Wed, Jun 20, 2007 at 08:24:54PM +0530, Vijaya N Malkapuram wrote:
> I am facing a problem w.r.t  symbols originating from .gnu.linkonce.r
> sections. I am using g++4.0.3 and 2.17 linker.
> 
> Errors of the type :
> `.gnu.linkonce.r._ZTS7TI_ListI16TI_VoidPtrListElE' referenced in section
> `.data' of /Mgc_home/shared/lib/librxl.a(ti_cktrep.o): defined in discarded
> section `.gnu.linkonce.r._ZTS7TI_ListI16TI_VoidPtrListElE' of
> /Mgc_home/shared/lib/librxl.a(ti_cktrep.o)

The linker is correct to complain.  .data should not contain
references to local symbols in a linkonce function.  You didn't say on
which target this is occurring, so it's hard to guess why you are
getting this error.  It could be bad user assembly code, a bug in gas,
or a bug in g++.

You can work around the linker error by passing --noinhibit-exec to
ld.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list