[PATCH] D101080: [lld/mac] Implement support for .weak_def_can_be_hidden

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 19:52:06 PDT 2021


thakis marked 6 inline comments as done.
thakis added a comment.

Thanks!



================
Comment at: lld/MachO/InputFiles.cpp:460
+    // that's not isPrivateExtern and isWeakDefCanBeHidden. That matters
+    // with ld64's semantics. With lld's semantics there's no observable
+    // difference between a symbol that's weak and isWeakDefCanBeHidden
----------------
int3 wrote:
> Did I understand it correctly?
Yes :)


================
Comment at: lld/test/MachO/weak-def-can-be-hidden.s:56
+# looks like a bug in ld64 (?) If you change lit.local.cfg to set %lld to ld to
+# test compatibility, you have to add some arbitary suffix to these two lines:
+# HEADERS-NOT: WEAK_DEFINES
----------------
int3 wrote:
> s/arbitary/arbitrary/
> 
> but also: maybe "you have to remove the HEADERS check" would be clearer? I had to think for a second to make the link between adding a suffix and ensuring that a `-NOT` check wouldn't match
There are 3 HEADERS check spread over the file. Adding a suffix is faster :)


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

https://reviews.llvm.org/D101080



More information about the llvm-commits mailing list