lkml.org 
[lkml]   [2011]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] x86, boot: Use common ELF header defines
Date
<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


\
 
 \ /
  Last update: 2011-02-26 18:57    [W:0.765 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site