public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <brgerst@gmail.com>
To: hpa@zytor.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] x86, boot: Use common ELF header defines
Date: Sat, 26 Feb 2011 12:54:02 -0500	[thread overview]
Message-ID: <1298742844-8256-2-git-send-email-brgerst@gmail.com> (raw)
In-Reply-To: <1298742844-8256-1-git-send-email-brgerst@gmail.com>

<linux/elf.h> defines elfhdr and elf_phdr appropriately for 32-bit
and 64-bit.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
 arch/x86/boot/compressed/misc.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 3a19d04..2d57c97 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -275,13 +275,8 @@ static void error(char *x)
 
 static void parse_elf(void *output)
 {
-#ifdef CONFIG_X86_64
-	Elf64_Ehdr ehdr;
-	Elf64_Phdr *phdrs, *phdr;
-#else
-	Elf32_Ehdr ehdr;
-	Elf32_Phdr *phdrs, *phdr;
-#endif
+	struct elfhdr ehdr;
+	struct elf_phdr *phdrs, *phdr;
 	void *dest;
 	int i;
 
-- 
1.7.4


  reply	other threads:[~2011-02-26 17:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26 17:54 [PATCH 0/3] x86 boot cleanups Brian Gerst
2011-02-26 17:54 ` Brian Gerst [this message]
2011-02-27 11:05   ` [PATCH 1/3] x86, boot: Use common ELF header defines Pekka Enberg
2011-02-26 17:54 ` [PATCH 2/3] x86, boot: Remove memptr Brian Gerst
2011-02-27 11:07   ` Pekka Enberg
2011-02-26 17:54 ` [PATCH 3/3] x86, boot: merge memcpy() Brian Gerst
2011-02-27 11:11   ` Pekka Enberg

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=1298742844-8256-2-git-send-email-brgerst@gmail.com \
    --to=brgerst@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.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