Skip to content

Commit

Permalink
Get linkage name for mangled C++ symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaut committed Feb 6, 2024
1 parent acae595 commit 9cfdb3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Src/loadelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,12 @@ static void _processFunctionDie( struct symbol *p, Dwarf_Debug dbg, Dwarf_Die di

specification_die = die;

if ( DW_DLV_OK != dwarf_diename( die, &name, 0 ) )
/* Get the possibly mangled linkage name if it exists */
if ( DW_DLV_OK == dwarf_attr( die, DW_AT_linkage_name, &attr_data, 0) )
{
dwarf_formstring( attr_data, &name, 0 );
}
else if ( DW_DLV_OK != dwarf_diename( die, &name, 0 ) )
{
/* Name will be hidden in a specification reference */
attr_tag = DW_AT_specification;
Expand Down

0 comments on commit 9cfdb3b

Please sign in to comment.