[PATCH 1/3] x86, boot: Use common ELF header defines

From: Brian Gerst
Date: Sat Feb 26 2011 - 12:54:46 EST


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

Signed-off-by: Brian Gerst <brgerst@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/