This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Solaris 10 (AMD64) GCC 4.0.2: linkage issues
- From: Tom Emerson <tree at basistech dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 16 Nov 2005 13:23:20 -0500
- Subject: Solaris 10 (AMD64) GCC 4.0.2: linkage issues
- Reply-to: tree at basistech dot com
I have Solaris 10 on AMD64, using the bundled GCC
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
and the 4.0.2 binary package. The problem occurs with both.
I'm attempting to build part of a C++ application and am getting a
strange link error:
ld: fatal: relocation error: file: ./obj_g/amd64-solaris10-gcc40/mksdic.o section: .rel.debug_info symbol: : relocation against a discarded symbol,
symbol is part of discarded section: .gnu.linkonce.t._ZNK18CompressedADFSARep21get_transition_vectorEv
collect2: ld returned 1 exit status
The mangled symbol (containing ADFSARep) refers to a member function in the code.
Googling for this error only returns hits on people attempting to
bootstrap GCC itself, and comes down to an incompatibility between
Solaris ld and GNU ld. From what I've read elsewhere the
recommendation is to use GNU as but Sun ld, so I'm completely
confused.
Simple C++ programs work fine, of course. The executable in question
uses several .o files as well as a number of static
libraries. However, I can get a similar error if I construct a
command-line that just links two of the object files without including
any of the static libraries.
I've tried various things: even trying to link against a small subset
of the code, or building a shared library instead of a static, or
pretty much anything else that invokes the linker, results in this
problem. The only difference is the mangled name that shows up.
Any and all help and suggestions are appreciated.
-tree
--
Tom Emerson Basis Technology Corp.
Software Architect http://www.basistech.com
"You can't fake quality any more than you can fake a good meal." (W.S.B.)