merge from open-source master

Change-Id: I483fedf77d978b1c6e52d73eebc14f011bb9f809
diff --git a/linker/linker.c b/linker/linker.c
index 5cc05e2..6719b12 100644
--- a/linker/linker.c
+++ b/linker/linker.c
@@ -469,7 +469,7 @@
             DEBUG("%5d %s: looking up %s in %s\n",
                   pid, si->name, name, lsi->name);
             s = _elf_lookup(lsi, elf_hash, name);
-            if(s != NULL)
+            if ((s != NULL) && (s->st_shndx != SHN_UNDEF))
                 goto done;
         }
     }