Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Jan 2022 18:55:41 +0100
From: Markus Wichmann <>
Subject: Re: Cannot dlopen() an already loaded shared library by its
 SONAME name

On Tue, Jan 11, 2022 at 12:50:33PM +0100, Ilia K wrote:
> Hi!
> It turns out that `dlopen()` in musl cannot find the already loaded shared
> library using the library soname from the dynamic section, unlike glibc.
> [...]
> Do you have any plans to support it?

Given that this question already surfaced twice and was denied just as
often, I'm guessing no.

The reason for the behavior is that loading a library with explicit path
name is what you do with a plugin, and you don't necessarily want a
plugin's symbols to be visible to everyone. That's why a library loaded
by path name does not get a shortname set, and a shortname is what you
need to be able to find a library by just its name.

I would suggest always loading the library by its short name and setting
LD_LIBRARY_PATH if this is what you want. That behavior works
consistently across all libc implementations I know.


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.