OSDN Git Service

linker: Make the errors reported by dlopen/dlsym be more useful.
authorDima Zavin <dima@android.com>
Thu, 21 May 2009 01:28:09 +0000 (18:28 -0700)
committerDima Zavin <dima@android.com>
Thu, 28 May 2009 03:16:19 +0000 (20:16 -0700)
commit2e85579c34047c305caf15fb0ebe02bf3d001d0e
tree0fb54231b64d077f94b567acfbae3ecaaec672bc
parent49e55332784b82f7112ee7c1ea3c176c9dc32d7a
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>
linker/Android.mk
linker/dlfcn.c
linker/linker.c
linker/linker.h
linker/linker_debug.h