runtime_loader: <x86>runtime_loader can handle x86_gcc2 binaries.

* <x86_gcc2>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.
This commit is contained in:
Jérôme Duval 2018-08-01 20:45:01 +02:00
parent 574dc1a374
commit 0594302a65
1 changed files with 3 additions and 6 deletions

View File

@ -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 // loading) we init the search path subdir if the compiler version doesn't
// match ours. // match ours.
if (sSearchPathSubDir == NULL) { if (sSearchPathSubDir == NULL) {
#if defined(_COMPAT_MODE) && !defined(__x86_64__) #if __GNUC__ == 2 || (defined(_COMPAT_MODE) && !defined(__x86_64__))
sSearchPathSubDir = "x86";
#else
#if __GNUC__ == 2
if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_4) if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_4)
sSearchPathSubDir = "x86"; 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) if ((image->abi & B_HAIKU_ABI_MAJOR) == B_HAIKU_ABI_GCC_2)
sSearchPathSubDir = "x86_gcc2"; sSearchPathSubDir = "x86_gcc2";
#endif #endif
#endif
} }
set_abi_version(image->abi); set_abi_version(image->abi);