This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Gold on solaris 2.10 sparc
- From: Cary Coutant <ccoutant at google dot com>
- To: svkra at web dot de
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 8 Jan 2014 11:01:13 -0800
- Subject: Re: Gold on solaris 2.10 sparc
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W42AC0E2F50685EC8428295D8B10 at phx dot gbl>
> On Sparc i get a bus error when invoking:
>
> g++ -gsplit-dwarf -c test.c
> g++ -Wl,--gdb-index test.o -o testen
>
> output:
> collect2: error: ld terminated with signal 10 [Bus Error], core dumped
>
> When i remove the --gdb-index option, the crash disappears.
>
> Pstack is:
>
> 00384dec _ZN6elfcpp4SwapILi64ELb0EE8writevalEPyy (fb8864bc, 0, 0, 0, 0, 0) + 28
> 003b95a0 _ZN6elfcpp4SwapILi64ELb0EE8writevalEPhy (fb8864bc, 0, 0, 494d, 0, adf1) + 1c
> 00580d18 _ZN4gold9Gdb_index8do_writeEPNS_11Output_fileE (a3d190, b9d340, b88190, 39, c, ffbfb7c3) + 1d0
> 004d9398 _ZN4gold11Output_data5writeEPNS_11Output_fileE (a3d190, b9d340, e9768, fba4b370, 0, ffbfb82c) + 24
> 00684a74 _ZN4gold14Output_section13Input_section5writeEPNS_11Output_fileE (a39450, b9d340, 0, 4, 0, 64a7) + 40
> 00689878 _ZN4gold14Output_section8do_writeEPNS_11Output_fileE (a3cfb8, b9d340, b87910, 33, 0, 64a4) + 3ec
> 004d9398 _ZN4gold11Output_data5writeEPNS_11Output_fileE (a3cfb8, b9d340, e9768, fba4b370, 0, b9d810) + 24
> 005fe74c
> _ZN4gold6Layout35write_sections_after_input_sectionsEPNS_11Output_fileE
> (ffbfee58, b9d340, fba47940, 0, fbb62a40, b9d340) + 178
> 005ff984 _ZN4gold31Write_after_input_sections_task3runEPNS_9WorkqueueE (a1e5b8, ffbff40c, ffbfba8c, ffbfeeb0, ffbfef00, 0) + 24
> 007bcd20 _ZN4gold9Workqueue17find_and_run_taskEi (ffbff40c, 0, 9d2a68, 8bd378, 1, 1c) + 19c
> 007bd50c _ZN4gold9Workqueue7processEi (ffbff40c, 0, ffbfbb88, ffbff40c, 9d2a88, 9d0eb0) + 14
> 0033d0f4 main (1d, ffbff4cc, ffbff544, 0, ffbfbb90, ffbff440) + 750
> 0033c760 _start (0, 0, 0, 0, 0, 0) + 5c
>
> Is gold currently supported on sparc platforms ?
As far as I know, yes. This looks more like a bug with the --gdb-index
option than in the Sparc port, though. I can take a look at it if you
can give me the linker command line and a tarball of all the input
files to the link (including system crt*.o files and libraries).
Please run
g++ -v -Wl,--gdb-index test.o -o testen
In the verbose output, look for the command that runs the linker
(probably collect2). I'll need that command line and all the object
files and libraries listed there.
-cary