This is the mail archive of the
binutils@sourceware.org
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>, Roland McGrath <roland at hack dot frob dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 31 Mar 2014 14:18:12 -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>
> That's extremely similar to what I was just writing myself.
> I had a different (and possibly infeasible) idea for the behavior in
> the case when it can't be defined.
> That is, to morph it into an actually undefined symbol.
>
> What would yours do in case of weak references to __ehdr_start when it
> cannot be defined?
You'll still get the error.
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.
-cary