import_DWARF_prototypes() now takes JUST a lib argument
authorDima Kogan <dima@secretsauce.net>
Wed, 23 Apr 2014 10:41:55 +0000 (03:41 -0700)
committerChanho Park <chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:25 +0000 (20:38 +0900)
dwarf_prototypes.c
dwarf_prototypes.h
output.c

index f76dbed..24da288 100644 (file)
@@ -779,9 +779,11 @@ static bool import(struct protolib* plib, struct library* lib, Dwfl* dwfl)
        return true;
 }
 
-bool import_DWARF_prototypes(struct protolib* plib, struct library* lib,
-                                                        Dwfl *dwfl)
+bool import_DWARF_prototypes(struct library* lib)
 {
+       struct protolib*        plib = lib->protolib;
+       Dwfl*                           dwfl = lib->dwfl;
+
        if (plib == NULL) {
                plib = protolib_cache_default(&g_protocache, lib->soname, 0);
                if (plib == NULL) {
@@ -790,7 +792,11 @@ bool import_DWARF_prototypes(struct protolib* plib, struct library* lib,
                }
        }
 
-       return import(plib, lib, dwfl);
+       if (import(plib, lib, dwfl)) {
+               lib->protolib = plib;
+               return true;
+       }
+       return false;
 }
 
 /*
index 02ebf3f..e0b7392 100644 (file)
@@ -6,4 +6,4 @@
 #include "prototype.h"
 #include "library.h"
 
-bool import_DWARF_prototypes(struct protolib* plib, struct library* lib, Dwfl *dwfl);
+bool import_DWARF_prototypes(struct library* lib);
index 5dcc475..f7d23ce 100644 (file)
--- a/output.c
+++ b/output.c
@@ -217,7 +217,7 @@ library_get_prototype(struct library *lib, const char *name)
                        (filter_matches_library(options.plt_filter,    lib ) ||
                         filter_matches_library(options.static_filter, lib ) ||
                         filter_matches_library(options.export_filter, lib )))
-                       import_DWARF_prototypes(lib->protolib, lib, lib->dwfl);
+                       import_DWARF_prototypes(lib);
 #endif
 
                if (lib->protolib == NULL)