Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 8 Dec 2012 23:30:59 -0800
From: Isaac Dunham <idunham@...abit.com>
To: musl@...ts.openwall.com
Subject: Re: static linking and dlopen

On Sun, 9 Dec 2012 03:55:30 +0100
Szabolcs Nagy <nsz@...t70.net> wrote:

> i think one could make a dso that has no dependency
> (all dependencies are linked into it including libc),
> and no pointers are passed (directly or indirectly)
> to types which are not entirely part of the abi
> between the dso and the main binary
> (ie no FILE* or anything that might have different
> internals on the two sides)

Under at least glibc, this is supported.
This is what gcc/ld does with "-static -shared".

> in that case dlopen() would work and even dlclose()
> can be safe (as the programmer has control over the
> entire code)
> 
> of course care should be taken and it might not be
> very useful but one could implement loadable/unloadable
> plugins with static linking


-- 
Isaac Dunham <idunham@...abit.com>

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.