This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/10569: -z max-page-size may not work for linker scripts
On Sun, Aug 30, 2009 at 07:02:47PM -0700, H.J. Lu wrote:
> On Sun, Aug 30, 2009 at 6:47 PM, Alan Modra<amodra@bigpond.net.au> wrote:
> > On Sun, Aug 30, 2009 at 11:42:20AM -0700, H.J. Lu wrote:
> >> 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.
> >
> > Yes, I treat "--oformat other_elf" just the same as "--oformat srec".
> > I don't really have a strong opinion as to what should be done in
> > this case.
> >
>
> It can also happen with
>
> OUTPUT_FORMAT("elf32-i386")
> OUTPUT_ARCH(i386)
>
> in linker script and all input files are elf32-i386. I won't expect
> the page size
> won't be 4KB. This is a regression.
You're kidding me. A regression? A change in behaviour for a
contrived test case, you mean. We had this case wrong before my patch
anyway, in an even worse way. "CONSTANT (MAXPAGESIZE)" in a linker
script would use the default emulation maxpagesize, while the backend
bfd linker would use the output target maxpagesize.
--
Alan Modra
Australia Development Lab, IBM