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] Fix -z max-page-size


On Wed, Jan 17, 2007 at 11:58:44AM -0500, Jakub Jelinek wrote:
> On Wed, Jan 17, 2007 at 08:46:46AM -0800, H. J. Lu wrote:
> > > When using -z max-page-size=N and/or -z common-page-size=N
> > > options in addition to -T script.lds, the linker script is
> > > parsed before bfd_emul_set_{max,common}pagesize is called
> > > and thus CONSTANT (MAXPAGESIZE) and CONSTANT (COMMONPAGESIZE)
> > > return the default rather than overridden values.
> > > 
> > > Below is one possible fix, the other would be to call
> > > bfd_emul_set_*pagesize immediately in *_handle_option
> > > rather than waiting until parse_args returns and yet another
> > > would be not to evaluate CONSTANT (MAXPAGESIZE) etc. when
> > > parsing the script, but at some later time.
> > 
> > Will it work with
> > 
> > # ld -Tscript.ld -z max-page-size=N
> 
> No, but I consider that a feature.

That is used in

http://sourceware.org/ml/binutils/2007-01/msg00123.html

> 
> > I think we should implement what was proposed in:
> > 
> > http://sourceware.org/ml/binutils/2006-12/msg00290.html
> > 
> > Then you can use the new switch to make sure that the linker script
> > will be processed after bfd_emul_set_{max,common}pagesize.
> 
> That we certainly can do, but IMHO -z max-page-size etc. should
> have immediate effect, so that even with -Wl,-T immediately after the

I'd like a consistent solution. That is all codes in linker should
get the same maximum/common pagesize at any given time. Your change
may make fold_name to get a different maximum/common pagesize than
the rest of program.

H.J.


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