Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 8 Dec 2012 22:10:11 -0500
From: Rich Felker <>
Subject: Re: static linking and dlopen

On Sun, Dec 09, 2012 at 03:55:30AM +0100, Szabolcs Nagy 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)

It's not that simple. There's always at least one piece of state
that's shared: the brk. 2 versions of malloc running will always cause
horrible problems unless they're aware of each other or avoid using
brk at all.

There's also the issue of stdio flushing at exit. The main program's
exit() can't flush the stdio streams belonging to the dso.

Thread-local storage in the dso would also be another problematic


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.