From: Nathan Wagner Date: Mon, 22 May 2017 21:41:28 +0000 (-0500) Subject: exit with failure status if soname not found X-Git-Tag: v0.1.6~123 X-Git-Url: https://pd.if.org/git/?a=commitdiff_plain;h=09dde8c2b752ea64d012778ad795b7e70cd9fada;hp=ce7874c9460a2495982499d6ae42a1f21e794b50;p=zpackage exit with failure status if soname not found --- diff --git a/elf/soname.c b/elf/soname.c index 06e5662..8618152 100644 --- a/elf/soname.c +++ b/elf/soname.c @@ -118,9 +118,10 @@ int main(int ac, char **av) { for (dent = (Elf64_Dyn *)((char *)elfbase + dynsect->sh_offset); dent->d_tag != DT_NULL; dent++) { if (dent->d_tag == DT_SONAME) { printf("%s\n", dynname + dent->d_un.d_val); - break; + /* TODO can there be more than one? */ + exit(0); } } - return 0; + return 11; }