summaryrefslogtreecommitdiffstats
path: root/libdl
diff options
context:
space:
mode:
authorMatt Fischer <matt.fischer@garmin.com>2009-12-31 12:17:40 -0600
committerGarmin Android technology group <android@garmin.com>2010-03-17 16:11:37 -0500
commite2a8b1fd19fb3a8ead2ba28ddba27be19fa978b5 (patch)
treee5448ec45187a37dbade76fcf10115f91135a8bd /libdl
parentede2e75f4942293342dfb8dfd4751369600ed8f1 (diff)
downloadbionic-e2a8b1fd19fb3a8ead2ba28ddba27be19fa978b5.zip
bionic-e2a8b1fd19fb3a8ead2ba28ddba27be19fa978b5.tar.gz
bionic-e2a8b1fd19fb3a8ead2ba28ddba27be19fa978b5.tar.bz2
Added support for dladdr()
dladdr() is a GNU extension function, which allows the caller to retrieve symbol information for a specified memory address. It is useful for things like generating backtrace information at runtime. Change-Id: I3a1def1a6c9c666d93e1e97b7d260dfa5b9b79a9
Diffstat (limited to 'libdl')
-rw-r--r--libdl/libdl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdl/libdl.c b/libdl/libdl.c
index 7971942..b36af16 100644
--- a/libdl/libdl.c
+++ b/libdl/libdl.c
@@ -14,12 +14,14 @@
* limitations under the License.
*/
+#include <dlfcn.h>
/* These are stubs for functions that are actually defined
* in the dynamic linker (dlfcn.c), and hijacked at runtime.
*/
void *dlopen(const char *filename, int flag) { return 0; }
-char *dlerror(void) { return 0; }
+const char *dlerror(void) { return 0; }
void *dlsym(void *handle, const char *symbol) { return 0; }
+int dladdr(void *addr, Dl_info *info) { return 0; }
int dlclose(void *handle) { return 0; }
#ifdef __arm__