diff options
| author | Nick Kralevich <nnk@google.com> | 2012-04-23 16:50:00 -0700 |
|---|---|---|
| committer | Nick Kralevich <nnk@google.com> | 2012-04-23 16:50:34 -0700 |
| commit | 94179a509ee3f6ba7b4ba45fb90477b01049dab8 (patch) | |
| tree | c26445b77fe8d4b289208db58f754deb4c2d16cf | |
| parent | baeacba04dc09ab269cd75806fdefab7f4a6505e (diff) | |
| download | bionic-94179a509ee3f6ba7b4ba45fb90477b01049dab8.zip bionic-94179a509ee3f6ba7b4ba45fb90477b01049dab8.tar.gz bionic-94179a509ee3f6ba7b4ba45fb90477b01049dab8.tar.bz2 | |
linker: remove STB_LOCAL hack
The ARM static linker wasn't properly handling __exidx_start
and __exidx_end symbols. Now that the static linker has been fixed,
we don't need the dynamic linker to work around this problem.
Change-Id: I041b94903609fafab33663a7d441a5e70b7ffcdd
| -rw-r--r-- | linker/linker.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/linker/linker.c b/linker/linker.c index 6b6282d..eb9cc3e 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -408,33 +408,6 @@ static Elf32_Sym *_elf_lookup(soinfo *si, unsigned hash, const char *name) return NULL; } -/* - * Essentially the same method as _elf_lookup() above, but only - * searches for LOCAL symbols - */ -static Elf32_Sym *_elf_lookup_local(soinfo *si, unsigned hash, const char *name) -{ - Elf32_Sym *symtab = si->symtab; - const char *strtab = si->strtab; - unsigned n = hash % si->nbucket;; - - TRACE_TYPE(LOOKUP, "%5d LOCAL SEARCH %s in %s@0x%08x %08x %d\n", pid, - name, si->name, si->base, hash, hash % si->nbucket); - for(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; - if (ELF32_ST_BIND(s->st_info) != STB_LOCAL) continue; - /* no section == undefined */ - if(s->st_shndx == 0) continue; - - TRACE_TYPE(LOOKUP, "%5d FOUND LOCAL %s in %s (%08x) %d\n", pid, - name, si->name, s->st_value, s->st_size); - return s; - } - - return NULL; -} - static unsigned elfhash(const char *_name) { const unsigned char *name = (const unsigned char *) _name; @@ -458,16 +431,6 @@ _do_lookup(soinfo *si, const char *name, unsigned *base) soinfo *lsi = si; int i; - /* If we are trying to find a symbol for the linker itself, look - * for LOCAL symbols first. Avoid using LOCAL symbols for other - * shared libraries until we have a better understanding of what - * might break by doing so. */ - if (si->flags & FLAG_LINKER) { - s = _elf_lookup_local(si, elf_hash, name); - if(s != NULL) - goto done; - } - /* Look for symbols in the local scope (the object who is * searching). This happens with C++ templates on i386 for some * reason. |
