[haiku-development] Symbol resolution problem with add-ons, userlandfs

  • From: Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 13 Jul 2014 01:30:32 +0200

Hello,

while working with userlandfs I ran into a problem related to mutexes 
and the runtime loader.
My FS-addon uses kernel mutexes, so when compiling for userlandfs it 
should use the implementation from kernelland_emu 
(libuserlandfs_haiku_kernel.so).
There is a problem with mutex_init() though: libroot also has a 
function by the same name. So when userlandfs_server loads my FS-add-
on, the runtime loader chooses the mutex_init symbol from libroot and 
not from libuserlandfs_haiku_kernel.

Is there any way around that? Making it use the symbol from the correct 
library when loading the add-on? LD_PRELOAD doesn't work either for 
this case.

--
So long, jua

Other related posts: