Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 14 Jul 2016 11:52:29 +0200
From: Jason Ramapuram <>
Cc: Jason Ramapuram <>
Subject: Regarding whole-archive linking libc.a into a shared lib

Hello there,

Is it at all possible to link musl's libc.a statically into a shared lib?
After a lot of trying I either get relocation errors (when using musl-gcc
built on say centos7) as such (
or hidden symbols not being defined like below (when using Alpine linux) :

undefined reference to `__tls_get_new'
tgt/Linux-x86_64/mylib/lib/ hidden symbol `__tls_get_new’ isn't
final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:58: recipe for target ‘tgt/Linux-x86_64/mulib/lib/’ failed
make: *** [tgt/Linux-x86_64/mylib/lib/] Error 1

I understand this might conflict when someone tries to link against this
and from a binary, however would it be possible somehow to mangle
all the libc calls internally inside the shared lib? Is there a tool that
would be able to do this? It would be really nice to have a portable shared
lib that has libc built in.

Content of type "text/html" skipped

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.