- while (1) {
- if (dwarf_tag(&die) == DW_TAG_subprogram) {
-
- // I use the linkage function name if there is one, otherwise the
- // plain name
- const char* function_name = NULL;
- Dwarf_Attribute attr;
- if (dwarf_attr(&die, DW_AT_linkage_name, &attr) != NULL)
- function_name = dwarf_formstring(&attr);
- if (function_name == NULL)
- function_name = dwarf_diename(&die);
- if (function_name == NULL) {
- complain(&die, "Function has no name. Not importing" );
- goto next_prototype;
- }
+ 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;
+ }