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>
5 files changed
tree: 0fb54231b64d077f94b567acfbae3ecaaec672bc
  1. .gitignore
  2. Android.mk
  3. libc/
  4. libdl/
  5. libm/
  6. libstdc++/
  7. libthread_db/
  8. linker/