[PATCH] D102076: [lld/mac] Write every weak symbol only once in the output
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 7 12:49:55 PDT 2021
gkm accepted this revision.
gkm added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lld/MachO/InputFiles.cpp:614-615
nextIsec->data = isec->data.slice(symbolOffset);
+ nextIsec->numRefs = 0;
+ nextIsec->canOmitFromOutput = false;
isec->data = isec->data.slice(0, symbolOffset);
----------------
These are already specified as initial values in the class declaration.
================
Comment at: lld/MachO/UnwindInfoSection.cpp:218-219
for (const InputSection *isec : compactUnwindSection->inputs) {
+ assert(isec->segname == segment_names::ld &&
+ isec->name == section_names::compactUnwind);
+
----------------
... or omit entirely.
================
Comment at: lld/test/MachO/weak-definition-gc.s:49
+## FIXME: ld64 manages to strip both one copy of _foo and _bar each.
+## We're only manage this if we're lucky and the object files
+## are in the right order. We're happy to not crash at link time
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102076/new/
https://reviews.llvm.org/D102076
More information about the llvm-commits
mailing list