diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-08-26 21:09:26 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-08-26 21:09:26 -0400 |
commit | f419bcb9dcfb6af60fbf1d58d92caf4b3d62a4da (patch) | |
tree | f9b1fc4c34d59ee892504c7259100e94140d3e98 /src/ldso/dladdr.c | |
parent | 9bff7c133e73ecfb200614d7a7d386a164a1a61f (diff) | |
download | musl-f419bcb9dcfb6af60fbf1d58d92caf4b3d62a4da.tar.gz musl-f419bcb9dcfb6af60fbf1d58d92caf4b3d62a4da.tar.bz2 musl-f419bcb9dcfb6af60fbf1d58d92caf4b3d62a4da.tar.xz musl-f419bcb9dcfb6af60fbf1d58d92caf4b3d62a4da.zip |
dladdr support for dynamic linker (nonstandard extension)
based on patches submitted by boris brezillon. this commit also fixes
the issue whereby the main application and libc don't have the address
ranges of their mappings stored, which was theoretically a problem for
RTLD_NEXT support in dlsym; it didn't actually matter because libc
never calls dlsym, and it seemed to be doing the right thing (by
chance) for symbols in the main program as well.
Diffstat (limited to 'src/ldso/dladdr.c')
-rw-r--r-- | src/ldso/dladdr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ldso/dladdr.c b/src/ldso/dladdr.c new file mode 100644 index 00000000..265bb681 --- /dev/null +++ b/src/ldso/dladdr.c @@ -0,0 +1,9 @@ +#define _GNU_SOURCE +#include <dlfcn.h> + +int __dladdr(void *, Dl_info *); + +int dladdr(void *addr, Dl_info *info) +{ + return __dladdr(addr, info); +} |