This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: linker bug 10515
On Mon, Oct 05, 2009 at 01:01:46PM +0100, Nathan Sidwell wrote:
> Alan Modra wrote:
>
>>> 2) make it an error to have FILEHDRS and/or PHDRS in not-the-first
>>> segment of the PHDRS statement.
I'd assumed here that you meant PT_LOAD header by "segment".
>> This is the best option IMO.
>
> This patch does that. We allow FILEHDRS/PHDRS provided it's the first
> segment, or the previous segment had such headers. The phdrs.t testcase
> has such an example.
>
> tested on powerpc-elf, ok?
No. I think you should just check PT_LOAD headers. That would allow
various non-load headers to appear first if anyone so desires
(eg. PT_PHDR, PT_INTERP). It would also simplify the documentation
and error message.
--
Alan Modra
Australia Development Lab, IBM