Blob Blame History Raw
From edac28173d05a547ad20442991ffd7708eba10bb Mon Sep 17 00:00:00 2001
Message-Id: <edac28173d05a547ad20442991ffd7708eba10bb.1431592766.git.panand@redhat.com>
In-Reply-To: <1fb6841aa15407dbf371589d7abca7bc2d35815c.1431592766.git.panand@redhat.com>
References: <1fb6841aa15407dbf371589d7abca7bc2d35815c.1431592766.git.panand@redhat.com>
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Date: Tue, 17 Feb 2015 15:53:07 +0900
Subject: [PATCH 07/17] arm64: fix elf-related header issues

- add a missing EM_AARCH64 macro
- linux/elf.h was also replaced with elf.h because they are conflicting
  each other.
---
 include/elf.h                      | 1 +
 kexec/arch/arm64/kexec-arm64.c     | 3 +--
 kexec/arch/arm64/kexec-elf-arm64.c | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/elf.h b/include/elf.h
index 5db637ba2f60..cd2802ae1091 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -259,6 +259,7 @@ typedef struct
 #define EM_ARC_A5	93		/* ARC Cores Tangent-A5 */
 #define EM_XTENSA	94		/* Tensilica Xtensa Architecture */
 #define EM_NUM		95
+#define EM_AARCH64	183		/* ARMv8-A */
 
 /* If it is necessary to assign new unofficial EM_* values, please
    pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
index 86408598a465..eb68b6b3d9e3 100644
--- a/kexec/arch/arm64/kexec-arm64.c
+++ b/kexec/arch/arm64/kexec-arm64.c
@@ -7,6 +7,7 @@
 #include <assert.h>
 #include <ctype.h>
 #include <dirent.h>
+#include <elf.h>
 #include <errno.h>
 #include <getopt.h>
 #include <inttypes.h>
@@ -19,8 +20,6 @@
 
 #include <sys/stat.h>
 
-#include <linux/elf.h>
-
 #include "dt-ops.h"
 #include "kexec.h"
 #include "crashdump.h"
diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
index 13dc5e2724d9..8b336054a6ab 100644
--- a/kexec/arch/arm64/kexec-elf-arm64.c
+++ b/kexec/arch/arm64/kexec-elf-arm64.c
@@ -5,12 +5,11 @@
 #define _GNU_SOURCE
 
 #include <assert.h>
+#include <elf.h>
 #include <errno.h>
 #include <getopt.h>
 #include <libfdt.h>
 
-#include <linux/elf.h>
-
 #include "dt-ops.h"
 #include "crashdump-arm64.h"
 #include "kexec-arm64.h"
-- 
2.1.0