This is the mail archive of the
mailing list for the binutils project.
Re: gold regression vs BFD ld: __ehdr_start
- From: Roland McGrath <mcgrathr at google dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, Roland McGrath <roland at hack dot frob dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 31 Mar 2014 14:27:05 -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>
On Mon, Mar 31, 2014 at 2:18 PM, Cary Coutant <email@example.com> wrote:
> I thought about transforming the symbol into an undef so that the
> error would come from relocate_section(), but you'd also have to
> modify issue_undefined_symbol_error() to check for hidden symbols.
> Given your assertion that an early error was reasonable, it didn't
> seem worth the churn.
I was unclear. In the case of a static link with a weak undefined
reference to __ehdr_start, that must resolve to 0 normally and not
generate an error.
The case I was talking about was under -shared, when the treatment of
an undefined symbol would normally be to generate a dynamic reloc.
In that case, I think it's acceptable to generate an error instead of
going back and resizing the dynamic sections and everything you'd have