[haiku-commits] haiku: hrev52151 - src/system/runtime_loader

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 1 Aug 2018 15:11:51 -0400 (EDT)

hrev52151 adds 1 changeset to branch 'master'
old head: 574dc1a3740244d2d1407eb540bf8f954c94e69e
new head: 0594302a65c673ec378dd719b2b5cb331113ccd1
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=0594302a65c6+%5E574dc1a37402

----------------------------------------------------------------------------

0594302a65c6: 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.

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52151
Commit:      0594302a65c673ec378dd719b2b5cb331113ccd1
URL:         https://git.haiku-os.org/haiku/commit/?id=0594302a65c6
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Wed Aug  1 18:45:01 2018 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 6 deletions(-)
src/system/runtime_loader/elf_load_image.cpp | 9 +++------

----------------------------------------------------------------------------

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);


Other related posts:

  • » [haiku-commits] haiku: hrev52151 - src/system/runtime_loader - Jérôme Duval