public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7506: Solaris 64-bit shared c++ link failure using binutils
@ 2002-08-06  6:46 tot
  0 siblings, 0 replies; only message in thread
From: tot @ 2002-08-06  6:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7506
>Category:       c++
>Synopsis:       Solaris 64-bit shared c++ link failure using binutils
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 06 06:46:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     tot@trema.com
>Release:        gcc-3.1.1 and later in the branch
>Organization:
>Environment:
sparc-sun-solaris2.7
>Description:
When compiling 64-bit C++ shared libraries and programs under Solaris, GNU ld fails to do the final linking.  It is unclear whether this is a gcc or binutils bug.  I have tried gcc-3.1.1 and later branch versions, and binutils 2.12.1 and later branch versions, with same results.

The trigger when it starts failing is to have multiple "main" program object files.  With one, it works always.

In my machine, the final liking fails like:

g++ -m64 -mcpu=ultrasparc -v -o link-test main_1.o main_2.o -L`pwd` -ll_1
Reading specs from /usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/specs
Configured with: ../gcc-3.1-branch/configure --prefix=/usr/gnu/sparcv9 --with-cpu=v9 --with-gnu-as --with-gnu-ld --enable-version-specific-runtime-libs --enable-long-long --enable-threads --enable-languages=c,c++ --target=sparcv9-sun-solaris2.7 --host=sparcv9-sun-solaris2.7 --with-local-prefix=/usr/local/sparcv9
Thread model: posix
gcc version 3.1.1 20020617 (prerelease)
 /usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/collect2 -V -m elf64_sparc -Y P,/usr/lib/sparcv9 -Qy -o link-test /usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/crt1.o /usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/crti.o /usr/lib/sparcv9/values-Xa.o /usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/crtbegin.o -L/var/tmp/t -L/usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1 -L/usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/../../../../sparcv9-sun-solaris2.7/lib -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/../../.. main_1.o main_2.o -ll_1 -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc -lc /usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/crtend.o /usr/gnu/sparcv9/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1.1/crtn.o
main_2.o(.eh_frame+0x70): relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN7foo_1_1D1Ev
main_2.o(.eh_frame+0x90): relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN7foo_1_110to_destroyC1Ev
main_2.o(.eh_frame+0xb0): relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN7foo_1_110to_destroyD1Ev
main_2.o(.eh_frame+0xd0): relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN7foo_1_18method_1Ev
main_2.o(.eh_frame+0xf0): relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN7foo_1_18method_2Ev
main_2.o(.eh_frame+0x110): relocation truncated to fit: R_SPARC_DISP32 .gnu.linkonce.t._ZN7foo_1_1C1Ev
GNU ld version 2.12.90 20020716
  Supported emulations:
   elf64_sparc
   elf32_sparc
collect2: ld returned 1 exit status
>How-To-Repeat:
link-test.pl will try to generate and compile couple of small shared libraries, main objects and link them in the current directory.  The script is overly parametrized to find out when it starts breaking.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-06 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-06  6:46 c++/7506: Solaris 64-bit shared c++ link failure using binutils tot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).