[GOLD] assertion on more than one PT_NOTE
Ian Lance Taylor
iant@google.com
Tue Apr 16 06:21:00 GMT 2013
On Sun, Apr 14, 2013 at 11:30 PM, Alan Modra <amodra@gmail.com> wrote:
> I see no reason why an executable should be limited to one PT_NOTE
> header. This patch removes that limitation in gold.
>
> As far as I can see there is no code in gold that needs segments to be
> unique like this. OK to apply?
>
> PR gold/15355
> * layout.cc (Layout::segment_precedes): Allow more than one
> segment with the same type and flags.
This should only happen when using a linker script. Otherwise
something is wrong. So I would rather see something like this:
gold_assert(flags1 != flags2 ||
this->script_options_->saw_phdrs_clause());
That patch is OK if it works.
Ian
More information about the Binutils
mailing list