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 210565 llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFObject.h
llvm/trunk/include/llvm/MC/MCDwarf.h
llvm/trunk/include/llvm/MC/MCFixup.h
llvm/trunk/include/llvm/MC/MCFragment.h
llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/trunk/lib/MC/MCAsmBackend.cpp
llvm/trunk/lib/MC/MCAssembler.cpp
llvm/trunk/lib/MC/MCDwarf.cpp
llvm/trunk/lib/Object/RelocationResolver.cpp
llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
llvm/trunk/test/CodeGen/RISCV/fixups-relax-diff.ll
llvm/trunk/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll
llvm/trunk/test/DebugInfo/RISCV/relax-debug-frame.ll
llvm/trunk/test/MC/RISCV/fde-reloc.s
llvm/trunk/tools/dsymutil/DwarfLinker.cpp
|