Implement lookup by DT_SONAME

This CL also fixes SEARCH_NAME hack and resolves
  https://code.google.com/p/android/issues/detail?id=6670
  once and for all.

Bug: https://code.google.com/p/android/issues/detail?id=6670
Change-Id: I9b8d6a672cd722f30fbfbb40cdee8d9b39cfe56e
This commit is contained in:
Dmitriy Ivanov
2015-03-17 20:06:36 -07:00
parent c6fbbb42e6
commit 618f1a36f8
5 changed files with 76 additions and 23 deletions

View File

@@ -92,7 +92,7 @@
#define SUPPORTED_DT_FLAGS_1 (DF_1_NOW | DF_1_GLOBAL | DF_1_NODELETE)
#define SOINFO_VERSION 1
#define SOINFO_VERSION 2
#define SOINFO_NAME_LEN 128
@@ -278,6 +278,8 @@ struct soinfo {
soinfo* get_local_group_root() const;
const char* get_soname();
private:
ElfW(Sym)* elf_lookup(SymbolName& symbol_name);
ElfW(Sym)* elf_addr_lookup(const void* addr);
@@ -322,6 +324,8 @@ struct soinfo {
uint8_t* android_relocs_;
size_t android_relocs_size_;
const char* soname_;
friend soinfo* get_libdl_info();
};