[PATCH] D111365: [ELF] Demote !isUsedInRegularObj lazy symbol

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 09:21:13 PDT 2021


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

LGTM. Following this through I can't think of a test case that we can write as if all is well it should error out before we get to the problem case.



================
Comment at: lld/ELF/SyntheticSections.cpp:3165
+    // For an unfetched lazy symbol (undefined weak), it must have been
+    // converted to Undefined and have VER_NDX_GLOBAL version here.
+    write16(buf, s.sym->versionId);
----------------
IIUC we could write assert(!s.sym->isLazy()); here. Not sure whether it would be worth doing it in the long term as it will look somewhat arbitrary. Maybe worth a test run with it in just to see if it hits anything unexpected.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111365



More information about the llvm-commits mailing list