views:

797

answers:

1

I'm having trouble linking a shared library using gcc 3.2.3 with binutils 2.18. When I try to link the library I get the following error:

.gnu.linkonce.t_... referenced in section .rodata: defined in discarded section .gnu.linkonce.t...

I've done a fair amount of googling on this and most places seem to indicate it is a regression introduce in binutils 2.17 and later fixed in 2.18.50, but I was curious if anybody knew if there were any particular workarounds for the issue without having to touch binutils and gcc.

Thanks.

A: 

This turned out to be a strange result where the system was mismatching gcc with a different binutils. /usr/bin/gcc was being used (3.2.3) and /usr/local/bin/ld was being used with it due to /usr/local/bin being in front of /usr/bin in the path. When we switched so that /usr/bin was at the front of the path, the appropriate /usr/bin/ld was called (binutils 2.14) and this seems to have resolved the problem.

Joe Corkery