From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: Re: SID ELF loader using wrong load address?
Date: Tue, 05 Feb 2002 08:39:00 -0000 [thread overview]
Message-ID: <3C600AC0.417C922E@redhat.com> (raw)
In-Reply-To: <3C5EEF5F.77116D06@redhat.com>
Approved by fche and committed.
Dave Brolley wrote:
> Hi,
>
> I have a linker script for an application on an ELF target which
> contains something like the following:
>
> .reloc_section 0x1000 : AT (LOADADDR(.text)+SIZEOF(.text))
> {
> *(.reloc_section)
> }
>
> This is a section of code which should be loaded at the end of the .text
> section and is intended to be copied (by the application itself) to
> address 0x1000 before being executed. However, the SID ELF loader
> currently loads this section at address 0x1000 (the VMA) instead of at
> the given LMA. Visual inspection of a hex dump of my executable shows
> that, for elf32, the address being used at offset 8 of the section
> header is indeed the VMA and that the LMA is at offset 12 (can anyone
> confirm this?).
>
> The attached patch gets the section loaded at the proper LMA and has
> been tested against my port (an internal one) and against xstormy16. I
> would not expect any regressions since the LMA and the VMA are the same
> unless one plays linker script tricks like the one above.
>
> OK to commit?
>
> Dave
>
> ------------------------------------------------------------------------
> Name: lma.ChangeLog
> lma.ChangeLog Type: Plain Text (text/plain)
> Encoding: 7bit
>
> Name: lma.patch.txt
> lma.patch.txt Type: Plain Text (text/plain)
> Encoding: 7bit
prev parent reply other threads:[~2002-02-05 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-04 12:30 Dave Brolley
2002-02-04 12:42 ` Frank Ch. Eigler
2002-02-04 14:33 ` Dave Brolley
2002-02-05 8:39 ` Dave Brolley [this message]
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=3C600AC0.417C922E@redhat.com \
--to=brolley@redhat.com \
--cc=sid@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).