This is the mail archive of the
mailing list for the binutils project.
Re: gold regression vs BFD ld: __ehdr_start
- From: Cary Coutant <ccoutant at google dot com>
- To: Roland McGrath <mcgrathr at google dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Tue, 1 Apr 2014 15:59:36 -0700
- Subject: Re: gold regression vs BFD ld: __ehdr_start
- Authentication-results: sourceware.org; auth=none
- References: <20140330011513 dot D6435744AE at topped-with-meat dot com> <CAKOQZ8x2Aj3reAZKyEAAKKjcFFTu7KZY01WwXCHiOD0WLQC=_g at mail dot gmail dot com> <CAHACq4qsJMXQAXnjEGp3xQjfyztVkhXccEeLYvz7Qn=piJD40Q at mail dot gmail dot com> <CAB=4xhrE7=X1EwOFmOxmw4D8akKvYBDfruTknM6Lbce=4JGjuA at mail dot gmail dot com> <CAHACq4qz==mw2zqkez=JeZqj0kPJPwiC2RVO--=qFb87r84CFw at mail dot gmail dot com> <CAB=4xhrH5ap=uPuMPDoPhJ3gNZ-P0VFcKXLpbHbhGAakta=FDg at mail dot gmail dot com> <CAHACq4oOLFxnTpF4gGvjFAYgQoHyok=_mEiBpijSkAQ9PPV1fg at mail dot gmail dot com> <CAB=4xho=wbxV4AQD2W5ph92J3892k2y4rCX9yr0_Am7kd21TOg at mail dot gmail dot com> <CAHACq4rK8b6ccn9mqWzbDwXiUEkgxmLmY0MNfn8-uNe64PwP3g at mail dot gmail dot com>
> In ld/testsuite, the ehdr_start_missing.t script attempts to construct
> a situation where the first load segment cannot contain the headers by
> setting the text section start address to 0x10000000. That doesn't
> work! (At least, not in gold.) Gold will happily place the headers at
> 0x10000000, and place the text section immediately after that. I'm not
> sure if this is a bug or a feature. I think this is a known difference
> between the two linkers that has been discussed before.
Oops, not quite right. When using -Ttext=0x10000000, gold puts the
headers at 0x10000000 and starts the text immediately after. But with
a SECTIONS clause, gold puts the .text section at 0x10000000, and if
it can, it will create a load segment for the headers at 0x0ffff000.