linker: fix the undefined weak symbols issue
diff --git a/linker/linker.c b/linker/linker.c
index f5294d9..87fb19b 100644
--- a/linker/linker.c
+++ b/linker/linker.c
@@ -471,7 +471,7 @@
             DEBUG("%5d %s: looking up %s in %s\n",
                   pid, si->name, name, lsi->name);
             s = _do_lookup_in_so(lsi, name, &elf_hash);
-            if(s != NULL)
+            if ((s != NULL) && (s->st_shndx != SHN_UNDEF))
                 goto done;
         }
     }