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: PATCH: PR ld/10569: -z max-page-size may not work for linker scripts


On Sat, Aug 29, 2009 at 10:42 PM, Alan Modra<amodra@bigpond.net.au> wrote:
> On Fri, Aug 28, 2009 at 07:37:22AM -0700, H.J. Lu wrote:
>> Output target can be different from emulation target. Emulation target
>> may be ELF, which supports page sizes, while output target may not support
>> page sizes at all. We need to page sizes for both.
>
> Hmm, OK. ?If we are doing something like an "--oformat srec" link,
> then the bfd srec backend has no idea of page size, but the input
> files might be ELF and we might be using an ELF ld script which
> references MAXPAGESIZE.
>
> So the linker needs to know maxpagesize independently of the output.
> It just happens that the linker already has config.maxpagesize, so
> let's use that in ldexp.c. ?We will need to get config.maxpagesize
> from the bfd emulation target early in the link process, before we've
> parsed -z maxpagesize, and pass any changed value back before final
> link time.
>

What should happen case where

1. No -z page size command line option is given.
2. Output target is ELF and whose page size is different from default target.

Your checkin changes the output page size to the page size of the default
target.

-- 
H.J.


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