[libbacktrace] Unify function name preference handling
Both read_function_entry and read_referenced_name implement a priority scheme
for names. The priorities are:
- 1st: DW_AT_linkage_name
- 2nd: Name from DW_AT_abstract_origin or DW_AT_specification
- 3rd: DW_AT_name.
Ensure both functions fully adhere to it.
2019-01-16 Tom de Vries <tdevries@suse.de>
* dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
name.
(read_function_entry): Same. Don't allow name found via
DW_AT_abstract_origin or case DW_AT_specification to override linkage
name.
From-SVN: r267963