diff mbox series

[v6,20/21] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32

Message ID 1452209679-19445-21-git-send-email-ynorov@caviumnetworks.com
State New
Headers show
Series None | expand

Commit Message

Yury Norov Jan. 7, 2016, 11:34 p.m. UTC
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>


To make life for tools (such as gdb) easier when dealing with ILP32 processes,
we report a proper subarchitecture for ILP32 in the ELF auxiliary vectors.

Signed-off-by: Andrew Pinski <Andrew.Pinski@caviumnetworks.com>

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>

Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>

Reviewed-by: David Daney <ddaney@caviumnetworks.com>

---
 arch/arm64/include/asm/elf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.5.0

Comments

Arnd Bergmann Jan. 8, 2016, 9:05 a.m. UTC | #1
On Friday 08 January 2016 02:34:38 Yury Norov wrote:
> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h

> index a519233..392301b 100644

> --- a/arch/arm64/include/asm/elf.h

> +++ b/arch/arm64/include/asm/elf.h

> @@ -160,9 +160,9 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,

>  #ifdef CONFIG_COMPAT

>  

>  #ifdef __AARCH64EB__

> -#define COMPAT_ELF_PLATFORM            ("v8b")

> +#define COMPAT_ELF_PLATFORM            (is_ilp32_compat_task() ? "aarch64_be:ilp32" : "v8b")

>  #else

> -#define COMPAT_ELF_PLATFORM            ("v8l")

> +#define COMPAT_ELF_PLATFORM            (is_ilp32_compat_task() ? "aarch64:ilp32" : "v8l")

>  #endif

> 


Same comment as for patch 12: you know which one to use at compile-time,
so just drop the runtime check and use different macros.

	Arnd
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index a519233..392301b 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -160,9 +160,9 @@  extern int arch_setup_additional_pages(struct linux_binprm *bprm,
 #ifdef CONFIG_COMPAT
 
 #ifdef __AARCH64EB__
-#define COMPAT_ELF_PLATFORM		("v8b")
+#define COMPAT_ELF_PLATFORM		(is_ilp32_compat_task() ? "aarch64_be:ilp32" : "v8b")
 #else
-#define COMPAT_ELF_PLATFORM		("v8l")
+#define COMPAT_ELF_PLATFORM		(is_ilp32_compat_task() ? "aarch64:ilp32" : "v8l")
 #endif
 
 #define COMPAT_ELF_ET_DYN_BASE		(2 * TASK_SIZE_32 / 3)