Bug 17348 - Can't link 64-bit executable on Solaris 8
Summary: Can't link 64-bit executable on Solaris 8
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.1
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-07 15:19 UTC by Paul M. Dubuc
Modified: 2005-12-06 14:35 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.8
Target: sparc-sun-solaris2.8
Build: sparc-sun-solaris2.8
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul M. Dubuc 2004-09-07 15:19:08 UTC
Using g++ 3.3.1 (same results with 3.3.4) and binutils 2.14:

Configured with: ../gcc-3.3.1/configure --prefix=/vol/gnu/gcc-3.3.1
--enable-shared --enable-threads --enable-cpp --enable-languages=c++
--with-gnu-as --with-as=/vol/gnu/gcc-3.3.1/bin/as --with-gnu-ld
--with-ld=/vol/gnu/gcc-3.3.1/bin/ld --host=sparc-sun-solaris2.8
Thread model: posix
gcc version 3.3.1

we get many errors like the following when trying to  link an executable (all
libraries and .o files have been built 64-bit (-m64 option): 

/vol/gnu/gcc-3.3.1/bin/g++ -m64 -o /vobs/toe/local/bin/sun5g/toe
sun5g/VersionInfo.o sun5g/toe.o /vobs/toe/src/lib/*/sun5g/*.o
/vobs/is_foundations/snacc/lib/sun5g/obj/*.o
/vobs/is_foundations/vendor/zregx/zregx-2.1a/objs/*.o  -O2 -Xlinker -E -lpthread
-lposix4 -liberty -ldl -lnsl -lsocket -lstdc++ -R/usr/local/lib/gcc-3.3.1/sparcv9
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x128):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:41:
relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN9TOEStringD1Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x148):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:42:
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN4xstr7xstringINS_12var_char_bufILm32EcSt11char_traitsIcESaIcEEEED2Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x168):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:35:
relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN9TOEStringD0Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x188):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:36:
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN4xstr12var_char_bufILm32EcSt11char_traitsIcESaIcEED2Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x1a8):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:36:
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN4xstr12var_char_bufILm32EcSt11char_traitsIcESaIcEE17release_resourcesEv
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x1c8):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:36:
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN4xstr7xstringINS_12var_char_bufILm32EcSt11char_traitsIcESaIcEEEED1Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x1e8):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:37:
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN4xstr7xstringINS_12var_char_bufILm32EcSt11char_traitsIcESaIcEEEED0Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x208):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:40:
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN4xstr12var_char_bufILm32EcSt11char_traitsIcESaIcEED1Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacet.o(.eh_frame+0x228):/vobs/toe/src/lib/cfg/TOECfgFacet.cc:40:
relocation truncated to fit: R_SPARC_DISP32
.gnu.linkonce.t._ZN4xstr12var_char_bufILm32EcSt11char_traitsIcESaIcEED0Ev
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacility.o(.eh_frame+0x308):/vol/gnu/gcc-3.3.1/include/c++/3.3.1/ext/stl_hashtable.h:898:
relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN9TOEStringC1ERKSs
/vobs/toe/src/lib/cfg/sun5g/TOECfgFacility.o(.eh_frame+0x328):/vobs/toe/src/lib/cfg/TOECfgFacility.cc:52:
relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN9TOEStringD1Ev
...
Comment 1 Andrew Pinski 2004-09-07 16:51:40 UTC
Are you sure that binutils 2.14 is being used as there was a ld bug which had the same symptom, see 
PR 7506.  Also most likely this is not a GCC bug at all but a binutils one.
Comment 2 Paul M. Dubuc 2004-09-09 18:37:16 UTC
Thanks, Andrew.  You are right.  It's apprently a binutils bug.  I tried the
latest snapshot of binutils (040909) and the problem goes away.  I couldn't use
the latest release (2.15) because it has a core dump problem on Solaris 8.
Comment 3 Eric Botcazou 2004-09-10 05:11:23 UTC
Binutils 2.15 release is indeed broken on the platform; however binutils 2.15
CVS should work fine.