From 8211bc6325ef61f2fe2021fac9e0f4219abaccf2 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 5 Jul 2012 09:23:19 +0200 Subject: [PATCH] linker: cleanup of undefined state handling, which is really dead code Given that _elf_lookup (and thus, _do_lookup) cannot possibly return an undefined symbol (due to the check for SHN_UNDEF in _elf_lookup), there's no need for spurious checks for SHN_UNDEF on its return value. Conflicts: linker/linker.c Change-Id: Ic73cf439924b45f72d4d9ba3f64a888c96cbbd9b --- linker/linker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linker/linker.c b/linker/linker.c index 4bf5dc938..2a7ccd5b9 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -462,7 +462,7 @@ soinfo_do_lookup(soinfo *si, const char *name, Elf32_Addr *offset) DEBUG("%5d %s: looking up %s in %s\n", pid, si->name, name, lsi->name); s = soinfo_elf_lookup(lsi, elf_hash, name); - if ((s != NULL) && (s->st_shndx != SHN_UNDEF)) + if (s != NULL) goto done; } } -- 2.11.0