Set "is_in_public_symbol_table" property for vars & fns

* src/abg-dwarf-reader.cc (build_var_decl, build_function_decl):
	Set the "is_in_public_symbol_table" property for the variable or
	function decl.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-04-21 19:32:04 +02:00
parent 12c777681d
commit 1e55727b98

View File

@ -2924,6 +2924,12 @@ build_var_decl(read_context& ctxt,
result.reset(new var_decl(name, type, loc, mangled_name));
// Check if a symbol with this name is exported by the elf binary.
string linkage_name = get_linkage_name(result);
if (!linkage_name.empty())
if (ctxt.lookup_public_variable_symbol_from_elf(linkage_name))
result->set_is_in_public_symbol_table(true);
return result;
}
@ -3038,6 +3044,12 @@ build_function_decl(read_context& ctxt,
is_inline, floc,
fmangled_name));
}
// Check if a symbol with this name is exported by the elf binary.
string linkage_name = get_linkage_name(result);
if (!linkage_name.empty())
if (ctxt.lookup_public_function_symbol_from_elf(linkage_name))
result->set_is_in_public_symbol_table(true);
return result;
}