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. libc/
  2. libdl/
  3. libm/
  4. libstdc++/
  5. libthread_db/
  6. linker/
  7. .gitignore
  8. Android.mk