Assume executable libs
authorAnas Nashif <anas.nashif@intel.com>
Sun, 14 Oct 2012 04:09:08 +0000 (21:09 -0700)
committerAnas Nashif <anas.nashif@intel.com>
Sun, 3 Feb 2013 00:44:44 +0000 (16:44 -0800)
tools/elfdeps.c

index a140014c68883f0a0dc689de37c2abd6943ac25f..08e581c1427dffd659aeb716ce7aa48751da131b 100644 (file)
@@ -15,6 +15,7 @@
 int filter_private = 0;
 int soname_only = 0;
 int fake_soname = 1;
+int assume_exec = 0;
 
 typedef struct elfInfo_s {
     Elf *elf;
@@ -235,7 +236,7 @@ static int processFile(const char *fn, int dtype)
     if (ehdr->e_type == ET_DYN || ehdr->e_type == ET_EXEC) {
        ei->marker = mkmarker(ehdr);
        ei->isDSO = (ehdr->e_type == ET_DYN);
-       ei->isExec = (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH));
+       ei->isExec = assume_exec || (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH));
 
        processSections(ei);
     }
@@ -292,6 +293,7 @@ int main(int argc, char *argv[])
        { "filter-private", 0, POPT_ARG_VAL, &filter_private, -1, NULL, NULL },
        { "soname-only", 0, POPT_ARG_VAL, &soname_only, -1, NULL, NULL },
        { "no-fake-soname", 0, POPT_ARG_VAL, &fake_soname, 0, NULL, NULL },
+       { "assume-exec", 0, POPT_ARG_VAL, &assume_exec, -1, NULL, NULL },
        POPT_AUTOHELP 
        POPT_TABLEEND
     };