|
Message-ID: <96367f9c-4b02-c512-9d46-96de9e39a059@bell-sw.com> Date: Mon, 25 May 2020 20:26:51 +0300 From: Alexander Scherbatiy <alexander.scherbatiy@...l-sw.com> To: Rich Felker <dalias@...c.org> Cc: musl@...ts.openwall.com, Markus Wichmann <nullplan@....net> Subject: Re: Shared library loading On 22.05.2020 21:25, Rich Felker wrote: > The concept here is that non-pathname library names should be loaded > from the library path and not replaced by something (typically a > "module" or "plug-in") in a different, explicitly-loaded location that > happens to have a colliding base filename. > > For example suppose your application loads modules from $libdir/myapp/ > and has a module named "libfoo.so". Unbeknownst to you, there's also a > "libfoo.so" in the system paths, and some library you potentially load > indirectly (maybe the GPU driver for some video hardware you've never > heard of) depends on "libfoo.so". > > If dlopen("$libdir/myapp/libfoo.so") had put "libfoo.so" in the > namespace such that it would satisfy future load requests for the name > "libfoo.so", the subsequent load would break due to getting the wrong > (unrelated) library. Is it correct that RTLD_GLOBAL flag is in some kind of obsolete in musl because calling dlopen("$libdir/myapp/libfoo.so", RTLD_NOW | RTLD_GLOBAL); dlopen("$libdir2/myapp2/libbar.so", RTLD_LAZY); does not allow libbar.so to find library $libdir/myapp/libfoo.so which it is depend on? What is the suggested way in musl to load $libdir/myapp/libfoo.so from a custom directory so libbar.so can find it? Thanks, Alexander. > Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.