diff options
author | Elliott Hughes <enh@google.com> | 2014-02-13 01:23:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-13 01:23:31 +0000 |
commit | fc48e8cf28b80ce0f95e288eeee459b4cb932afa (patch) | |
tree | 10875d7828fe4fa26c4e96b828f82d6601ba0683 | |
parent | 7b3876e2516fd55d61a48cb23a7080ea88b9617b (diff) | |
parent | c62b8a4d3f73b070099d9aa594a261b5250d6cc9 (diff) | |
download | android_bionic-fc48e8cf28b80ce0f95e288eeee459b4cb932afa.tar.gz android_bionic-fc48e8cf28b80ce0f95e288eeee459b4cb932afa.tar.bz2 android_bionic-fc48e8cf28b80ce0f95e288eeee459b4cb932afa.zip |
Merge "Remove unused variables not spotted by GCC."
-rwxr-xr-x | linker/linker.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index b4e9109b0..ead9bd43d 100755 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -835,10 +835,7 @@ int do_dlclose(soinfo* si) { #if defined(USE_RELA) static int soinfo_relocate(soinfo* si, ElfW(Rela)* rela, unsigned count, soinfo* needed[]) { - ElfW(Sym)* symtab = si->symtab; - const char* strtab = si->strtab; ElfW(Sym)* s; - ElfW(Rela)* start = rela; soinfo* lsi; for (size_t idx = 0; idx < count; ++idx, ++rela) { @@ -853,11 +850,11 @@ static int soinfo_relocate(soinfo* si, ElfW(Rela)* rela, unsigned count, soinfo* continue; } if (sym != 0) { - sym_name = reinterpret_cast<const char*>(strtab + symtab[sym].st_name); + sym_name = reinterpret_cast<const char*>(si->strtab + si->symtab[sym].st_name); s = soinfo_do_lookup(si, sym_name, &lsi, needed); if (s == NULL) { // We only allow an undefined symbol if this is a weak reference... - s = &symtab[sym]; + s = &si->symtab[sym]; if (ELF_ST_BIND(s->st_info) != STB_WEAK) { DL_ERR("cannot locate symbol \"%s\" referenced by \"%s\"...", sym_name, si->name); return -1; @@ -1136,10 +1133,7 @@ static int soinfo_relocate(soinfo* si, ElfW(Rela)* rela, unsigned count, soinfo* #else // REL, not RELA. static int soinfo_relocate(soinfo* si, ElfW(Rel)* rel, unsigned count, soinfo* needed[]) { - ElfW(Sym)* symtab = si->symtab; - const char* strtab = si->strtab; ElfW(Sym)* s; - ElfW(Rel)* start = rel; soinfo* lsi; for (size_t idx = 0; idx < count; ++idx, ++rel) { @@ -1155,11 +1149,11 @@ static int soinfo_relocate(soinfo* si, ElfW(Rel)* rel, unsigned count, soinfo* n continue; } if (sym != 0) { - sym_name = reinterpret_cast<const char*>(strtab + symtab[sym].st_name); + sym_name = reinterpret_cast<const char*>(si->strtab + si->symtab[sym].st_name); s = soinfo_do_lookup(si, sym_name, &lsi, needed); if (s == NULL) { // We only allow an undefined symbol if this is a weak reference... - s = &symtab[sym]; + s = &si->symtab[sym]; if (ELF_ST_BIND(s->st_info) != STB_WEAK) { DL_ERR("cannot locate symbol \"%s\" referenced by \"%s\"...", sym_name, si->name); return -1; |