[OpenBIOS] [PATCH 3/5] On ppc64, asm/sigcontext.h includes asm/elf.h

Laurent Vivier laurent at vivier.eu
Sat Oct 24 11:16:59 CEST 2015


asm/sigcontext.h:

    #ifdef __powerpc64__
    #include <asm/elf.h>
    #endif

to avoid to include here target/include/asm/elf.h, hardcode the path
to /usr/include/asm/elf.h in it.

Signed-off-by: Laurent Vivier <laurent at vivier.eu>
---
 include/arch/ppc/elf.h     | 4 ++++
 include/arch/sparc32/elf.h | 4 ++++
 include/arch/sparc64/elf.h | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/include/arch/ppc/elf.h b/include/arch/ppc/elf.h
index fd2a3f9..5836ae9 100644
--- a/include/arch/ppc/elf.h
+++ b/include/arch/ppc/elf.h
@@ -1,5 +1,9 @@
+#if defined(__powerpc64__) && defined(BOOTSTRAP)
+#include "/usr/include/asm/elf.h"
+#else
 #define ARCH_ELF_CLASS ELFCLASS32
 #define ARCH_ELF_DATA ELFDATA2MSB
 #define ARCH_ELF_MACHINE_OK(x) ((x)==EM_PPC)
 typedef Elf32_Ehdr Elf_ehdr;
 typedef Elf32_Phdr Elf_phdr;
+#endif
diff --git a/include/arch/sparc32/elf.h b/include/arch/sparc32/elf.h
index 8d429d7..dd4baf7 100644
--- a/include/arch/sparc32/elf.h
+++ b/include/arch/sparc32/elf.h
@@ -1,5 +1,9 @@
+#if defined(__powerpc64__) && defined(BOOTSTRAP)
+#include "/usr/include/asm/elf.h"
+#else
 #define ARCH_ELF_CLASS ELFCLASS32
 #define ARCH_ELF_DATA ELFDATA2MSB
 #define ARCH_ELF_MACHINE_OK(x) ((x)==EM_SPARC || (x)==EM_SPARC32PLUS)
 typedef Elf32_Ehdr Elf_ehdr;
 typedef Elf32_Phdr Elf_phdr;
+#endif
diff --git a/include/arch/sparc64/elf.h b/include/arch/sparc64/elf.h
index 8acad1a..e9da5f9 100644
--- a/include/arch/sparc64/elf.h
+++ b/include/arch/sparc64/elf.h
@@ -1,5 +1,9 @@
+#if defined(__powerpc64__) && defined(BOOTSTRAP)
+#include "/usr/include/asm/elf.h"
+#else
 #define ARCH_ELF_CLASS ELFCLASS64
 #define ARCH_ELF_DATA ELFDATA2MSB
 #define ARCH_ELF_MACHINE_OK(x) ((x)==EM_SPARCV9)
 typedef Elf64_Ehdr Elf_ehdr;
 typedef Elf64_Phdr Elf_phdr;
+#endif
-- 
2.4.3




More information about the OpenBIOS mailing list