From 0594302a65c673ec378dd719b2b5cb331113ccd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 1 Aug 2018 20:45:01 +0200 Subject: [PATCH] runtime_loader: runtime_loader can handle x86_gcc2 binaries. * runtime_loader can also handle x86 binaries. * At the moment the x86_64 kernel will execute the x86 runtime_loader when it sees x86 and x86_gcc2 binaries. The reason is checking the GCC version of a binary in the kernel seems cumbersome, the kernel should just fallback using the x86_gcc2 runtime_loader when the x86 one is missing. --- src/system/runtime_loader/elf_load_image.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/system/runtime_loader/elf_load_image.cpp b/src/system/runtime_loader/elf_load_image.cpp index ebd3f41b0f..b4cf78a786 100644 --- a/src/system/runtime_loader/elf_load_image.cpp +++ b/src/system/runtime_loader/elf_load_image.cpp @@ -629,17 +629,14 @@ load_image(char const* name, image_type type, const char* rpath, // loading) we init the search path subdir if the compiler version doesn't // match ours. if (sSearchPathSubDir == NULL) { -#if defined(_COMPAT_MODE) && !defined(__x86_64__) - sSearchPathSubDir = "x86"; -#else - #if __GNUC__ == 2 + #if __GNUC__ == 2 || (defined(_COMPAT_MODE) && !defined(__x86_64__)) if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_4) sSearchPathSubDir = "x86"; - #elif __GNUC__ >= 4 + #endif + #if __GNUC__ >= 4 || (defined(_COMPAT_MODE) && !defined(__x86_64__)) if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_2) sSearchPathSubDir = "x86_gcc2"; #endif -#endif } set_abi_version(image->abi);