[PATCH] D114749: [JITLink][ELF] Don't skip sections of size 0

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 19:29:25 PST 2021


lhames accepted this revision.
lhames added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h:302-303
 
-    // For now we just use this to skip the "undefined" section, probably need
-    // to revist.
-    if (Sec.sh_size == 0)
----------------
I wish I could remember what "undefined" sections referred to here -- we'll no longer be skipping them.

This is still the right way to go though -- we can put the proper check in if/when we hit issues with this.


================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h:308
 
-    auto &GraphSec = G->createSection(*Name, Prot);
+    Block *B = nullptr;
     if (Sec.sh_type != ELF::SHT_NOBITS) {
----------------
Is this needed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114749/new/

https://reviews.llvm.org/D114749



More information about the llvm-commits mailing list