Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 15 Jan 2013 15:54:44 +0100
From: pierre <pierre@...entlife.com>
To: musl@...ts.openwall.com
Subject: dladdr()

Latest musl-libc dladdr() fails here:

   // glibc:
   // gcc hello.c -o hello -ldl
   //
   // ret:1
   // dli_fname:./hello:0x400000
   // dli_sname:puts:0x4004c0

   // musl:
   // musl-gcc hello.c -o hello
   //
   // ret:0
   // dli_fname:(null):0
   // dli_sname:(null):0

   Dl_info dl = {0};
   int ret = dladdr(puts + 0, &dl);

   printf("ret:%d\n"
           "dli_fname:%s:%p\n"
           "dli_sname:%s:%p\n\n",
           ret,
           dl.dli_fname, dl.dli_fbase,
           dl.dli_sname, dl.dli_saddr);

What is missing to make this work?

Pierre

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.