Skip to content

Commit

Permalink
[dwarf] Use supported linkage_name attribute if using DWARF4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Jun 10, 2015
1 parent ac026f1 commit c22384d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,11 @@ void dwarf_func_term(Symbol *sfunc)
abuf.writeByte(DW_AT_sibling); abuf.writeByte(DW_FORM_ref4);
}
abuf.writeByte(DW_AT_name); abuf.writeByte(DW_FORM_string);
abuf.writeuLEB128(DW_AT_MIPS_linkage_name); abuf.writeByte(DW_FORM_string);
#if (DWARF_VERSION >= 4)
abuf.writeuLEB128(DW_AT_linkage_name); abuf.writeByte(DW_FORM_string);
#else
abuf.writeuLEB128(DW_AT_MIPS_linkage_name); abuf.writeByte(DW_FORM_string);
#endif
abuf.writeByte(DW_AT_decl_file); abuf.writeByte(DW_FORM_data1);
abuf.writeByte(DW_AT_decl_line); abuf.writeByte(DW_FORM_data2);
if (ret_type)
Expand Down

0 comments on commit c22384d

Please sign in to comment.