From: Simon Richter <Simon.Richter@hogyros.de>
To: Olaf Hering <olh@suse.de>
Cc: linuxppc-dev@ozlabs.org, Alan Modra <amodra@bigpond.net.au>
Subject: Re: [PATCH] remove check for ELF offset in powerpc bootimage
Date: Mon, 30 Jan 2006 14:43:57 +0100 [thread overview]
Message-ID: <43DE181D.7040204@hogyros.de> (raw)
In-Reply-To: <20060130132803.GA31263@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
Hi,
Olaf Hering wrote:
> Is this check really needed, are there PT_LOAD sections with offset
> zero (either zImage or vmlinux)? I see an offset which is always 64k.
Sure, an offset of zero is completely legal (obviously, the start
address would then be different from the load address of that segment).
Without context, I would say this loop is used to find some loadable
segment that does not include the ELF header. I cannot think of any
application for that, as it is certainly acceptable to merge LOAD
segments, and the segment it is looking for could have been merged with
the segment that includes the header.
If the current linker scripts specify that loading the header is
unneeded, this means that all LOAD headers will have nonzero offsets.
But I wouldn't count on that forever.[1]
Simon
[1] the Amiga bootloader, for example, assumes that all segments are to
be loaded, so things broke badly on APUS when the ldscript did not
remove the .note.gnu-stack section, which has a VMA of zero as it is
never loaded anyway. So depending on things being a particular way is
bad. :-)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
prev parent reply other threads:[~2006-01-30 14:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 13:28 [PATCH] remove check for ELF offset in powerpc bootimage Olaf Hering
2006-01-30 13:43 ` Simon Richter [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=43DE181D.7040204@hogyros.de \
--to=simon.richter@hogyros.de \
--cc=amodra@bigpond.net.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=olh@suse.de \
/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 NNTP newsgroup(s).