This is an archive of the discontinued LLVM Phabricator instance.

[DWARFLinker][DWARFv5] Add support for .debug_rnglists.
ClosedPublic

Authored by avl on Feb 13 2023, 4:26 AM.

Details

Summary

This patch adds support of DWARFv5 .debug_rnglists table.
As DWARFLinker resolves relocations, it is able to always
use DW_FORM_addr instead of DW_FORM_addrx. DW_FORM_addrx
helps to minimize number of relocations, it is also used for
split DWARF. Both of these cases are not relevant for the
DWARFLinker. Thus, this patch converts all DW_FORM_addrx
forms into the DW_FORM_addr. And, as the result, it converts
range lists of DW_FORM_rnglistx form into the DW_FORM_sec_offset.
For the --update case all DW_FORM_addrx, DW_FORM_rnglistx
are preserved as is.

Diff Detail

Event Timeline

avl created this revision.Feb 13 2023, 4:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2023, 4:26 AM
avl requested review of this revision.Feb 13 2023, 4:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2023, 4:26 AM
avl added a comment.Feb 21 2023, 7:20 AM

friendly ping...

aprantl accepted this revision.Feb 23 2023, 11:03 AM

I think this SGTM.

llvm/lib/DWARFLinker/DWARFLinker.cpp
1267

typo: "Can't"

I would use: "Cannot"

This revision is now accepted and ready to land.Feb 23 2023, 11:03 AM
avl added a comment.Feb 26 2023, 10:26 AM

@aprantl Thank you for the review!

This revision was landed with ongoing or failed builds.Feb 26 2023, 10:28 AM
This revision was automatically updated to reflect the committed changes.
llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-rnglists.test