Clean up the linker a bit, remove prelinking support.

Also make the errors more readable, since none of us seemed to know
what they actually meant. The new style is still as verbose as the
old, but that's probably necessary in the absence of chained exceptions
in C. Here's what you'd see if you try to boot after removing
libsurfaceflinger.so:

  32267 32267 E AndroidRuntime: java.lang.UnsatisfiedLinkError: Cannot load library: (linker.c:1629, pid 32259) soinfo_link_image: could not load library "libsystem_server.so" needed by "libandroid_servers.so"; caused by (linker.c:1629, pid 32259) soinfo_link_image: could not load library "libsurfaceflinger.so" needed by "libsystem_server.so"; caused by (linker.c:709, pid 32259) load_library: library "libsurfaceflinger.so" not found

This patch also fixes almost all of the compiler warnings.

Change-Id: I64bb59aed6d4e039c15ea45be2367f319ef879f8
This commit is contained in:
Elliott Hughes
2012-08-03 16:49:39 -07:00
parent 1c861728e5
commit 4688279db5
11 changed files with 321 additions and 360 deletions

View File

@@ -59,6 +59,10 @@ enum {
ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */
};
#ifdef __cplusplus
extern "C" {
#endif
int __libc_android_log_write(int prio, const char* tag, const char* buffer);
int __libc_android_log_print(int prio, const char *tag, const char *fmt, ...);
int __libc_android_log_vprint(int prio, const char *tag, const char *fmt, va_list ap);
@@ -66,4 +70,8 @@ int __libc_android_log_vprint(int prio, const char *tag, const char *fmt, va_lis
void __libc_android_log_event_int(int32_t tag, int value);
void __libc_android_log_event_uid(int32_t tag);
#ifdef __cplusplus
};
#endif
#endif /* _ANDROID_BIONIC_LOGD_H */