diff options
author | Elliott Hughes <enh@google.com> | 2012-08-03 16:49:39 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-08-07 11:41:10 -0700 |
commit | 4688279db5dcc4004941e7f133c4a1c3617d842c (patch) | |
tree | db614aaf2e0a02cef4b5f643fa91e9cbcfd7d5ff /linker/linker_phdr.h | |
parent | 1c861728e5c8dda7589e6595f4850d77ec21a236 (diff) | |
download | android_bionic-4688279db5dcc4004941e7f133c4a1c3617d842c.tar.gz android_bionic-4688279db5dcc4004941e7f133c4a1c3617d842c.tar.bz2 android_bionic-4688279db5dcc4004941e7f133c4a1c3617d842c.zip |
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
Diffstat (limited to 'linker/linker_phdr.h')
-rw-r--r-- | linker/linker_phdr.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/linker/linker_phdr.h b/linker/linker_phdr.h index d542e463e..753c7e76d 100644 --- a/linker/linker_phdr.h +++ b/linker/linker_phdr.h @@ -37,6 +37,10 @@ #include "linker.h" +#ifdef __cplusplus +extern "C" { +#endif + /* See linker_phdr.c for all usage documentation */ int @@ -52,21 +56,18 @@ phdr_table_unload(void* phdr_mmap, Elf32_Addr phdr_memsize); Elf32_Addr phdr_table_get_load_size(const Elf32_Phdr* phdr_table, - int phdr_count); + size_t phdr_count); int phdr_table_reserve_memory(const Elf32_Phdr* phdr_table, - int phdr_count, - Elf32_Addr required_base, - void** load_start, - Elf32_Addr* load_size, - Elf32_Addr* load_bias); + size_t phdr_count, + void** load_start, + Elf32_Addr* load_size, + Elf32_Addr* load_bias); int phdr_table_load_segments(const Elf32_Phdr* phdr_table, int phdr_count, - void* load_start, - Elf32_Addr load_size, Elf32_Addr load_bias, int fd); @@ -109,4 +110,8 @@ phdr_table_get_dynamic_section(const Elf32_Phdr* phdr_table, int phdr_count, Elf32_Addr load_bias); +#ifdef __cplusplus +}; +#endif + #endif /* LINKER_PHDR_H */ |