Force eager evaluation of symbolic difference on debug_info which is
required to be resolved eagerly for fission as dwo sections may not
contain relocations.
Fixes: #56642
Differential D130206
MC: force eager evaluation of relocations in `.debug_info` MaskRay on Jul 20 2022, 3:29 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions This does not fix the incompatibility with RISC-V linker relaxation. This changes DW_AT_high_pc from a length to (pre-DWARF-v4) an address. This is useful with linker relaxation, though, as it can decrease the number of relocations. https://maskray.me/blog/2021-03-14-the-dark-side-of-riscv-linker-relaxation#code-addresses I am going to revise some paragraphs about DWARF. Comment Actions Correct, this is not to fix the incompatibility with relaxation, it is to fix the compatibility with no relaxation and fission.
Interesting, do we have any target currently using that form?
Yes, this should be able to reduce the number of relocations at the cost of debug info size. However, given that we currently fail to emit the object file this seems like a good tradeoff. Comment Actions For -mno-relax code, using the length instead of the end address for DW_AT_high_pc leads to fewer relocations in the output. With this patch, there will be a relocation which cannot be resolved at assembler time, leading to larger output size.
No. As you can see, for -mno-relax, DW_AT_high_pc is a constant which saves more space than using the end address (one relocation) or using a .debug_addr indirection to represent the end address (more expensive),
See above. Comment Actions Pretty sure unneeded after https://reviews.llvm.org/D155357 completely fixed the requiresFixups heuristic problem :) |