This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold linker 2.22 regressed for DragonFly
On 1/2/2012 7:38 PM, Ian Lance Taylor wrote:
>
> What linker are you using to build ld1?
>
I'm just running a makefile target ">gmake check-TESTS".
The makefile makes a copy of ld-new (which is gold) and names the copy
ld, so gold is used to build ld1.
> You said earlier that gold built with ld does not have a problem.
To be clear, I'm trying to convey that the first gold built by the old
ld linker doesn't segfault when executed. I don't know how well it
works outside of that.
> Only gold built with gold segfaults. I am suggesting that you use
> --no-ctors-in-init-array when running gold. In fact you should try just
> editing options.h to make --no-ctors-in-init-array the default to see if
> that fixes all your problems.
Editing ld1_LDFLAGS to add --no-ctors-in-init-array is effectively this.
Also the title of this post is "gold linker 2.22 REGRESSED for
DragonFly". gold linker 2.21 doesn't need this switch to build itself.
I edited options.h to set ctors-in-init-array to false, followed by
">gmake clean" and ">gmake check-TESTS".
The result is better:
==================
All 2 tests passed
==================
Then I tried ">gmake check"
It got pretty far in the testsuite, complete through "split_i386.sh" and
starting failing at incremental-dump.cc due to numerous missing headers.
I'm got a separate build directory, so the test might not be accounting
for that (e.g. source is in {top}/binutils-2.22 and my build directory
is {top}/build-b222).
Is that options.h generated or is ctors-in-init-array hardcoded to true?
Thanks for your help,
John