summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/elf.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-10-11 14:52:10 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2013-10-25 15:59:33 +0100
commit5436b5c8305b4ed37c5d11f96c1aaccca63c9ab2 (patch)
tree9a7c10ab6485e59b219dbfee8ebd7124066ddad1 /arch/arm64/include/asm/elf.h
parentc194520ada7c8f2eddec5ebf24982483b49736a0 (diff)
arm64: ELF: add support for big-endian executables
This patch adds support for the aarch64_be ELF format to the AArch64 ELF loader. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/elf.h')
-rw-r--r--arch/arm64/include/asm/elf.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index e7fa87f9201b..a3e4a5564ea3 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -90,11 +90,24 @@ typedef struct user_fpsimd_state elf_fpregset_t;
* These are used to set parameters in the core dumps.
*/
#define ELF_CLASS ELFCLASS64
+#ifdef __AARCH64EB__
+#define ELF_DATA ELFDATA2MSB
+#else
#define ELF_DATA ELFDATA2LSB
+#endif
#define ELF_ARCH EM_AARCH64
+/*
+ * This yields a string that ld.so will use to load implementation
+ * specific libraries for optimization. This is more specific in
+ * intent than poking at uname or /proc/cpuinfo.
+ */
#define ELF_PLATFORM_SIZE 16
+#ifdef __AARCH64EB__
+#define ELF_PLATFORM ("aarch64_be")
+#else
#define ELF_PLATFORM ("aarch64")
+#endif
/*
* This is used to ensure we don't load something for the wrong architecture.