[haiku-bugs] Re: [Haiku] #12214: [runtime_loader] can't find libgcc_s.so.1 when LD_PRELOAD is used

  • From: "korli" <trac@xxxxxxxxxxxx>
  • Date: Mon, 31 Aug 2015 14:35:14 -0000

#12214: [runtime_loader] can't find libgcc_s.so.1 when LD_PRELOAD is used
-------------------------------------+----------------------------
Reporter: diver | Owner: zooey
Type: bug | Status: assigned
Priority: normal | Milestone: Unscheduled
Component: System/runtime_loader | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
-------------------------------------+----------------------------

Comment (by korli):

An idea:
When loading an x86 libroot_debug.so on a x86_gcc2 system,

[https://github.com/haiku/haiku/blob/master/src/system/runtime_loader/elf_load_image.cpp#L445
open_executable] is used to load libroot_debug dependencies aka libgcc_s,
but sSearchPathSubDir is still NULL because the application isn't loaded

[https://github.com/haiku/haiku/blob/master/src/system/runtime_loader/elf_load_image.cpp#L551
yet]. libgcc_s isn't located in standard search paths for x86_gcc2 and
cannot be found hence the failure message.
It has maybe worked earlier when libroot_debug.so had no dependencies.
In the end, it may be worthwhile to set sSearchPathSubDir also for
libraries when not already set.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12214#comment:14>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: