It is necessary to generate fixups in .debug_frame or .eh_frame as
relaxation is enabled due to the address delta may be changed after
linking.
There is an opcode with 6-bits data in debug frame encoding. So, we
also need 6-bits fixup types.
Paths
| Differential D58335
[DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame. ClosedPublic Authored by HsiangKai on Feb 17 2019, 3:45 PM.
Details
Summary It is necessary to generate fixups in .debug_frame or .eh_frame as There is an opcode with 6-bits data in debug frame encoding. So, we
Diff Detail
Event TimelineComment Actions Perhaps we should keep getKindForSize as being in bytes, and add a new getKindForSizeInBits? This would reduce the diff, but more importantly ensures that downstream forks don't silently break until runtime due to the changed semantics of getKindForSize despite having the same type as before. Comment Actions This seems sensible to me from a RISC-V perspective, though I'd appreciate it if one of the debug info people could feedback on the DWARF related changes. Might you have a chance to look at this @aprantl @probinson @JDevlieghere? Comment Actions The dwarfdump changes look okay, but the new tests don't exercise those changes. The simplest thing is probably to RUN llvm-dwarfdump in relax-debug-frame.ll and verify the output describes the frame as expected.
Comment Actions Use llvm-dwarfdump to ensure DWARF parsing is correct under relaxation.
lenary added a child revision: D61584: [DebugInfo] Some fields do not need relocations even relax is enabled..Jul 5 2019, 7:58 AM This revision is now accepted and ready to land.Jul 15 2019, 10:10 PM Comment Actions Looking at this in more detail - shouldn't we be making use of the R_RISCV_SET* relocations? This revision now requires changes to proceed.Jul 18 2019, 3:59 AM This revision was not accepted when it landed; it landed in state Needs Revision.Jul 18 2019, 7:47 AM Closed by commit rL366442: [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame. (authored by HsiangKai). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 189032 include/llvm/MC/MCDwarf.h
include/llvm/MC/MCFixup.h
include/llvm/MC/MCFragment.h
lib/MC/MCAsmBackend.cpp
lib/MC/MCAssembler.cpp
lib/MC/MCDwarf.cpp
lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
test/DebugInfo/RISCV/relax-debug-frame.ll
|
isPCRel -> IsPCRel