Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20121209215314.GG20323@brightrain.aerifal.cx>
Date: Sun, 9 Dec 2012 16:53:14 -0500
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: static linking and dlopen

On Sun, Dec 09, 2012 at 02:09:23PM -0600, Rob Landley wrote:
> On 12/08/2012 04:52:37 PM, Rich Felker wrote:
> >The source of all these problems is basically the same as the benefit
> >of static linking: the fact that the linker resolves, statically at
> >link time, which object files are needed to satisfy the needs of the
> >program. With dlopen, however, there is no static answer; *any* object
> >is potentially-needed, not directly by the main program, but possibly
> >by loaded modules.
> 
> Is there some way you could put a dlopen() symbol in libc.a that
> forces a build break? Perhaps a redirect to
> dlopen_is_not_compatible_with_static_linking_go_read_posix?

The dlopen in libc.a simply always-fails. For programs where loading
modules is optional, this is probably the ideal behavior.

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.