Use ELF_BASE_PLATFORM to pass ISA level
Some userland application/program runtime/dynamic loaded need to know about the current ISA level to use the best runtime. While kernel doesn't provides this info. ELF_PLATFORM only provides some info about the CPU, with very few info, for example, the value is "mips" for both 24Kc and P6600. Currently ELF_BASE_PLATFORM is not used by MIPS (only by powerpc). So we cant set its value as: mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r6 mips64, mips64r2, mips64r6 Then in userland, we can get it by: getauxval(AT_BASE_PLATFORM) The only problem is that it seems has different defination than ppc: on ppc, it is the mircoarchitecture while now we use it as ISA level on MIPS. Signed-off-by: YunQiang Su <syq@debian.org> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:

committed by
Thomas Bogendoerfer

parent
be28076433
commit
e585b768da
@@ -445,6 +445,9 @@ extern unsigned int elf_hwcap;
|
||||
#define ELF_PLATFORM __elf_platform
|
||||
extern const char *__elf_platform;
|
||||
|
||||
#define ELF_BASE_PLATFORM __elf_base_platform
|
||||
extern const char *__elf_base_platform;
|
||||
|
||||
/*
|
||||
* See comments in asm-alpha/elf.h, this is the same thing
|
||||
* on the MIPS.
|
||||
|
Reference in New Issue
Block a user