This is an archive of the discontinued LLVM Phabricator instance.

[DWARF] Refactor test to remove relocations for DWO
ClosedPublic

Authored by ayermolo on Jul 28 2021, 4:07 PM.

Details

Summary

The way this test generates object file results in relocation sections for .dwo sections. This is not legal. Re-wrote it to avoid those relocation sections.

Diff Detail

Event Timeline

ayermolo created this revision.Jul 28 2021, 4:07 PM
ayermolo requested review of this revision.Jul 28 2021, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2021, 4:07 PM
dblaikie added inline comments.Jul 29 2021, 8:54 AM
llvm/test/DebugInfo/X86/dwarfdump-header.s
24

Don't think there's a need to add the '.' at the start here in these labels? (leave it out like other labels above, etc?)

430

That doesn't look right, does it? 0x25 would be too large an index for the .debug_str_offsets.dwo section - there are only 5 things in there, so the valid indexes should be [0, 4], I think?

ayermolo added inline comments.Jul 29 2021, 10:07 AM
llvm/test/DebugInfo/X86/dwarfdump-header.s
430

This is encoding for DW_FORM_strx1.
0xe --> HANDLE_DW_FORM(0x0e, strp, 2, DWARF)
0x25 --> HANDLE_DW_FORM(0x25, strx1, 5, DWARF)

At least this is my understanding of what is happening here looking at comments and value of original .byte

dblaikie accepted this revision.Jul 29 2021, 10:12 AM

Sounds good, thanks!

llvm/test/DebugInfo/X86/dwarfdump-header.s
430

Oh, sorry - this is the abbreviation rather than the values, right right. Sorry about that.

This revision is now accepted and ready to land.Jul 29 2021, 10:12 AM
ayermolo updated this revision to Diff 362818.Jul 29 2021, 10:20 AM

updated labels

ayermolo marked 3 inline comments as done.Jul 29 2021, 10:21 AM
ayermolo added inline comments.
llvm/test/DebugInfo/X86/dwarfdump-header.s
24

Ah good catch. Was following example of other test, but it's different in this one.

This revision was automatically updated to reflect the committed changes.
ayermolo marked an inline comment as done.