summaryrefslogtreecommitdiffstats
path: root/linker
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2013-06-03 17:27:49 -0700
committerBrian Carlstrom <bdc@google.com>2013-06-03 20:15:14 -0700
commit6bec5b792a5f034089a942cb28cab26d36408235 (patch)
tree40758ce5b973feda4f6f2e34bce1d133d119a911 /linker
parent404d491eb655839bf4260cc168bb79864473e129 (diff)
downloadbionic-6bec5b792a5f034089a942cb28cab26d36408235.zip
bionic-6bec5b792a5f034089a942cb28cab26d36408235.tar.gz
bionic-6bec5b792a5f034089a942cb28cab26d36408235.tar.bz2
Small cleanup of soinfo_elf_lookup.
- Remove unnecessary line. - Move declarations to first use. Change-Id: I1d8398d6c13f7cb86bffe0b68af849e35a4b234d
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index c97b712..80dc624 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -440,17 +440,14 @@ dl_iterate_phdr(int (*cb)(dl_phdr_info *info, size_t size, void *data),
#endif
static Elf32_Sym* soinfo_elf_lookup(soinfo* si, unsigned hash, const char* name) {
- Elf32_Sym* s;
Elf32_Sym* symtab = si->symtab;
const char* strtab = si->strtab;
- unsigned n;
TRACE_TYPE(LOOKUP, "SEARCH %s in %s@0x%08x %08x %d",
name, si->name, si->base, hash, hash % si->nbucket);
- n = hash % si->nbucket;
- for (n = si->bucket[hash % si->nbucket]; n != 0; n = si->chain[n]) {
- s = symtab + n;
+ for (unsigned n = si->bucket[hash % si->nbucket]; n != 0; n = si->chain[n]) {
+ Elf32_Sym* s = symtab + n;
if (strcmp(strtab + s->st_name, name)) continue;
/* only concern ourselves with global and weak symbol definitions */