public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>, binutils <binutils@sources.redhat.com>
Subject: Re: PATCH: PR ld/10569: -z max-page-size may not work for linker  	scripts
Date: Mon, 31 Aug 2009 02:02:00 -0000	[thread overview]
Message-ID: <6dc9ffc80908301142h6b7364cew9dca8f5198b366fa@mail.gmail.com> (raw)
In-Reply-To: <20090830054221.GM19523@bubble.grove.modra.org>

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.

  reply	other threads:[~2009-08-30 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28  0:40 H.J. Lu
2009-08-28  3:55 ` Alan Modra
2009-08-28  5:50   ` H.J. Lu
2009-08-28  8:01     ` H.J. Lu
2009-08-28  8:09       ` Alan Modra
2009-08-28 14:31         ` H.J. Lu
2009-08-28 14:48           ` Alan Modra
2009-08-28 15:05             ` H.J. Lu
2009-08-30 13:51               ` Alan Modra
2009-08-31  2:02                 ` H.J. Lu [this message]
2009-08-31  2:50                   ` Alan Modra
2009-08-31  6:19                     ` H.J. Lu
2009-08-31  9:09                       ` Alan Modra
2009-08-31 18:16                       ` H.J. Lu
2009-09-01  0:00                         ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6dc9ffc80908301142h6b7364cew9dca8f5198b366fa@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).