From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sourceware.org
Subject: Re: ld lma assignment
Date: Tue, 22 Aug 2006 18:46:00 -0000 [thread overview]
Message-ID: <20060822180415.GA5475@lucon.org> (raw)
In-Reply-To: <20060822073344.GB23819@bubble.grove.modra.org>
On Tue, Aug 22, 2006 at 05:03:44PM +0930, Alan Modra wrote:
> {
> bfd_vma lma;
> asection *last;
>
> last = r->last_os->output_section_statement.bfd_section;
> - /* If dot moved backwards (which is invalid according
> - to ld docs) then leave lma equal to vma. This
> - keeps users of buggy ld scripts happy. */
> - if (dot >= last->vma)
> +
> + /* A backwards move of dot should be accompanied by
> + an explicit assignment to the section LMA (ie.
> + os->load_base set) because backwards moves normally
> + create overlapping LMAs. */
> + if (dot < last->vma)
> + {
> + einfo (_("%P: warning: dot moved backwards before `%s'\n"),
> + os->name);
> +
> + /* If dot moved backwards then leave lma equal to
> + vma. This is the old default lma, which might
> + just happen to work when the backwards move is
> + sufficiently large. Nag anyway, so people fix
> + their linker scripts. */
> + }
> + else
> {
There are 2 issues:
1. It doesn't check if there are overlapping LMAs when warning moving
dot backwards.
2. I don't think we should change lma just because dot is moved
backwards. We can change the affected linker scripts if they can be
made backward compatible.
H.J.
next prev parent reply other threads:[~2006-08-22 18:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 5:09 Alan Modra
2006-08-22 11:51 ` Alan Modra
2006-08-22 18:46 ` H. J. Lu [this message]
2006-08-23 1:55 ` Alan Modra
2006-08-23 3:47 ` H. J. Lu
2006-08-23 1:34 ` H. J. Lu
2006-08-23 2:58 ` Alan Modra
2006-08-23 3:36 ` H. J. Lu
2006-08-23 5:08 ` PATCH: ld lma assignment test failure H. J. Lu
2006-08-23 10:25 ` 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=20060822180415.GA5475@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sourceware.org \
/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).