If a functions is defined in a .conf, I do not parse the DWARF
authorDima Kogan <dima@secretsauce.net>
Wed, 23 Apr 2014 22:55:41 +0000 (15:55 -0700)
committerChanho Park <chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:25 +0000 (20:38 +0900)
Previously I would parse the DWARF data for such a function, but I wouldn't use
the result. Now I don't even parse

dwarf_prototypes.c

index 2960da3..1068bbb 100644 (file)
@@ -714,6 +714,12 @@ static bool import_subprogram(struct protolib* plib, struct library* lib,
                return true;
        }
 
+       if (!filter_matches_symbol(options.plt_filter,    function_name, lib) &&
+               !filter_matches_symbol(options.static_filter, function_name, lib) &&
+               !filter_matches_symbol(options.export_filter, function_name, lib)) {
+               complain(die, "Prototype not requested by any filter");
+               return true;
+       }
 
        complain(die, "subroutine_type: 0x%02x; function '%s'",
                         dwarf_tag(die), function_name);
@@ -726,13 +732,6 @@ static bool import_subprogram(struct protolib* plib, struct library* lib,
                return true;
        }
 
-       if (!filter_matches_symbol(options.plt_filter,    function_name, lib) &&
-               !filter_matches_symbol(options.static_filter, function_name, lib) &&
-               !filter_matches_symbol(options.export_filter, function_name, lib)) {
-               complain(die, "Prototype not requested by any filter");
-               return true;
-       }
-
        proto = malloc(sizeof(struct prototype));
        if (proto == NULL) {
                complain(die, "couldn't alloc prototype");