summaryrefslogtreecommitdiffstats
path: root/linker/linker.h
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2009-05-20 18:28:09 -0700
committerDima Zavin <dima@android.com>2009-05-27 20:16:19 -0700
commit2e85579c34047c305caf15fb0ebe02bf3d001d0e (patch)
tree0fb54231b64d077f94b567acfbae3ecaaec672bc /linker/linker.h
parent49e55332784b82f7112ee7c1ea3c176c9dc32d7a (diff)
downloadbionic-2e85579c34047c305caf15fb0ebe02bf3d001d0e.zip
bionic-2e85579c34047c305caf15fb0ebe02bf3d001d0e.tar.gz
bionic-2e85579c34047c305caf15fb0ebe02bf3d001d0e.tar.bz2
linker: Make the errors reported by dlopen/dlsym be more useful.
Changed it so that when the linker generates error messages, they are scribbled away into a buffer that dlfcn and friends can read from. Since the error messages are generetad with snprintf, and snprintf MAY call malloc during some code paths, we now link against a version of libc that does not contain malloc/free/realloc/calloc. We then define malloc and friends in the dynamic loader, and make them abort() if they are ever called. Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'linker/linker.h')
-rw-r--r--linker/linker.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/linker/linker.h b/linker/linker.h
index d80c761..69042c0 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -204,6 +204,7 @@ soinfo *find_library(const char *name);
unsigned unload_library(soinfo *si);
Elf32_Sym *lookup_in_library(soinfo *si, const char *name);
Elf32_Sym *lookup(const char *name, unsigned *base);
+const char *linker_get_error(void);
#ifdef ANDROID_ARM_LINKER
typedef long unsigned int *_Unwind_Ptr;