[PATCH 02/10] x86/um: Move ELF_PLATFORM fallback to x86-specific code
Thomas Weißschuh
linux at weissschuh.net
Tue Oct 28 02:15:37 PDT 2025
The generic UM code should not have references to x86-specific value.
Move the fallback into the x86-specific header.
Signed-off-by: Thomas Weißschuh <linux at weissschuh.net>
---
arch/um/os-Linux/elf_aux.c | 3 ---
arch/x86/um/asm/elf.h | 3 ++-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
index a62fe39e85c9..4aadb9ea5ae3 100644
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -71,7 +71,4 @@ __init void scan_elf_aux( char **envp)
else {
vsyscall_end = vsyscall_ehdr + page_size;
}
-
- if (!elf_aux_platform)
- elf_aux_platform = "i586";
}
diff --git a/arch/x86/um/asm/elf.h b/arch/x86/um/asm/elf.h
index 62ed5d68a978..e7a045e01471 100644
--- a/arch/x86/um/asm/elf.h
+++ b/arch/x86/um/asm/elf.h
@@ -69,7 +69,8 @@
} while (0);
extern char * elf_aux_platform;
-#define ELF_PLATFORM (elf_aux_platform)
+#define ELF_PLATFORM_FALLBACK "i586"
+#define ELF_PLATFORM (elf_aux_platform ?: ELF_PLATFORM_FALLBACK)
extern unsigned long vsyscall_ehdr;
extern unsigned long vsyscall_end;
--
2.51.1.dirty
More information about the linux-um
mailing list