[PATCH] D147544: [BOLT] Move from RuntimeDyld to JITLink
Job Noorman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 4 00:36:30 PDT 2023
jobnoorman added inline comments.
================
Comment at: bolt/lib/Core/BinaryEmitter.cpp:199
ELFDwarfLineSection->setFlags(ELF::SHF_ALLOC);
+ MCSectionELF *ELFDwarfLineStrSection =
+ static_cast<MCSectionELF *>(BC.MOFI->getDwarfLineStrSection());
----------------
ayermolo wrote:
> Why was this added?
JITLink only accepts relocations that reference symbols in allocatable sections. More specifically, [this assert](https://github.com/llvm/llvm-project/blob/3e6b80b1bdf42d7f3c73541250b2eb2480e7df32/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h#L156-L161) is triggered when not marking `.debug_line_str` allocatable.
An example of a failing test without this is `X86/dwarf5-debug-line.s`. Here, the sections `.local.text.main` and `.debug_line` have relocations pointing to `.debug_line_str`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147544/new/
https://reviews.llvm.org/D147544
More information about the llvm-commits
mailing list