Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 May 2017 12:30:37 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: John Hu <heat0415@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: A question about pure static linking with libdl

* John Hu <heat0415@...il.com> [2017-05-16 15:40:28 +0800]:
> Recently I have an experiment about whether full static-linked ld.gold with
> plugin function enabled can use its --plugin option to dynamically load
> plugins such as LLVMgold.so. I use "./configure --enable --enable-plugins
> --disable-werror LDFLAGS="-static" "  to generate a full statically linked
> ld.gold which does not have any dynamic library dependency, then I exec
> "./ld.gold --plugin LLVMgold.so" but an error occurs that "could not load
> plugin library: Dynamic loading not supported". I doubt this is a bug
> because it is claimed that musl supports full static linking but I am not
> sure about that. BTW, my experiment environment is Alpine 3.5.

dlopen is not supported in static linked binaries yet, that is non-trivial
to support and in your use case it does not make sense: the loaded lib is
linked against the host libc (and many other libs) and is in a package that
is updated independently of the libc, there is no guarantee that the static
linked libc is compatible with the host libc (and if there is then you
don't really need static linking anyway, you could get the same effect
by using your custom libc to launch ld.gold as ./mylibc.so ld-gold ).

> 
> Now I send this email again because I want this email to be replied
> according to "If you are not subscribed and want to receive a reply, please
> mention in your email that you want to be Cc'd." in the website.

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.