[PATCH] D147544: [BOLT] Move from RuntimeDyld to JITLink

Job Noorman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 06:19:04 PDT 2023


jobnoorman added inline comments.


================
Comment at: bolt/lib/Rewrite/JITLinkLinker.cpp:51
+                            const BinarySection &BinSection, uint64_t Address) {
+  auto *JLSection = LG.findSectionByName(BinSection.getSectionID());
+  assert(JLSection && "cannot find section in LinkGraph");
----------------
alexander-shaposhnikov wrote:
> alexander-shaposhnikov wrote:
> > (just in case) is it true that (at the moment) we have only one block within JLSection ?
> (in non-relocation mode)
Yes, that seems to be the case (`assert(JLSection->blocks_size() == 1)` doesn't break anything).

IIRC, I added this when still using `JITLink`'s built-in `.eh_frame` and PLT/GOT support which generates sections with multiple blocks. I'm not sure if this could ever happen when creating a `LinkGraph` from an ELF file so we could add the above `assert` and simplify this function a bit.


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