linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: Alan Modra <amodra@bigpond.net.au>,
	Paul Mackeras <paulus@samba.org>,
	linuxppc-dev@ozlabs.org
Subject: [PATCH] remove check for ELF offset in powerpc bootimage
Date: Mon, 30 Jan 2006 14:28:03 +0100	[thread overview]
Message-ID: <20060130132803.GA31263@suse.de> (raw)


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.




Do not check for offset, it is always set.

Signed-off-by: Olaf Hering <olh@suse.de>

 arch/powerpc/boot/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.16-rc1-olh/arch/powerpc/boot/main.c
===================================================================
--- linux-2.6.16-rc1-olh.orig/arch/powerpc/boot/main.c
+++ linux-2.6.16-rc1-olh/arch/powerpc/boot/main.c
@@ -152,7 +152,7 @@ static int is_elf64(void *hdr)
 	elf64ph = (Elf64_Phdr *)((unsigned long)elf64 +
 				 (unsigned long)elf64->e_phoff);
 	for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++)
-		if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0)
+		if (elf64ph->p_type == PT_LOAD)
 			break;
 	if (i >= (unsigned int)elf64->e_phnum)
 		return 0;
@@ -193,7 +193,7 @@ static int is_elf32(void *hdr)
 	elf32 = (Elf32_Ehdr *)elfheader;
 	elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff);
 	for (i = 0; i < elf32->e_phnum; i++, elf32ph++)
-		if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0)
+		if (elf32ph->p_type == PT_LOAD)
 			break;
 	if (i >= elf32->e_phnum)
 		return 0;
-- 
short story of a lazy sysadmin:
 alias appserv=wotan

             reply	other threads:[~2006-01-30 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-30 13:28 Olaf Hering [this message]
2006-01-30 13:43 ` [PATCH] remove check for ELF offset in powerpc bootimage Simon Richter

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=20060130132803.GA31263@suse.de \
    --to=olh@suse.de \
    --cc=amodra@bigpond.net.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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 NNTP newsgroup(s).