This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker bug 10515


On Wed, Oct 7, 2009 at 3:50 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Oct 6, 2009 at 3:29 AM, Alan Modra <amodra@bigpond.net.au> wrote:
>> On Tue, Oct 06, 2009 at 10:33:53AM +0100, Nathan Sidwell wrote:
>>> Alan Modra wrote:
>>>
>>>> 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.
>>>
>>> do you mean that only the first PT_LOAD segment can have headers, and no
>>> subsequent PT_LOAD headers? ?Please clarify
>>
>> Yes. ?You would need overlapping PT_LOAD segments if more than one
>> could have PHDRS. ?I suppose that would be possible with overlays but
>> I doubt the existing code supports it.
>>
>
> FYI, Linux ia64 kernel does use it:
>
> http://www.sourceware.org/bugzilla/show_bug.cgi?id=10744
>
> Can we allow FILEHDRS/PHDRS if the previous segment has the same
> headers?
>
> Thanks.
>

Here is a patch.  OK to install?

Thanks.


-- 
H.J.
---

ld/

2009-10-07  Nathan Sidwell  <nathan@codesourcery.com>

	PR ld/10744
	* ldlang.c (lang_new_phdr): Allow PHDRS and FILEHDR in
	PT_LOAD segment if previous segment contains either
	PHDRS or FILEHDR.

	* ld.texinfo (PHDRS): Updated.

ld/testsuite/

2009-10-07  H.J. Lu  <hongjiu.lu@intel.com>
	    Nathan Sidwell  <nathan@codesourcery.com>

	* ld-scripts/phdrs3.d: Updated.

	* ld-scripts/phdrs3.exp: Run phdrs3a.

	* ld-scripts/phdrs3a.d: New.
	* ld-scripts/phdrs3a.t: Likewise.

Attachment: ld-pr10744-1.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]