Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 16 Jan 2013 12:00:18 +0100
From: pierre <pierre@...entlife.com>
To: musl@...ts.openwall.com, Rich Felker <dalias@...ifal.cx>
Subject: Re: dladdr()

Rich,

> Are you using static or dynamic linking?

Dynamic. Before posting here, I checked the musl source 
code, and the binary:

'objdump -z -d hello' gives: callq 4003e0 <dladdr@plt>

Further, 'musl-gcc -static hello.c -o hello_s' weights
23KB while the shared binary above weights only 7KB.

Finally, my example provided the compilation/linking 
cmd line, which, by default, is dynamic:

   // glibc:
   // gcc hello.c -o hello -ldl

   // musl:
   // musl-gcc hello.c -o hello

I am attaching the source code linked with musl 0.9.8
so you can duplicate this issue without wasting time.

Besides knowing how to enable dladdr() in dynamic mode,
I am interested in knowing what other steps are needed
beyond replacing the #ifdef SHARED by another custom 
define (#ifdef __FORCE_DL) for musl's dl implementation
to do the job in static binaries (with exported symbols).

Thank you for musl, a much-needed alternative.

Pierre

View attachment "hello.c" of type "text/x-csrc" (686 bytes)

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.