[PATCH] D113167: [lld-macho] Allow exporting weak def private-extern symbols.
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 5 07:56:24 PDT 2021
oontvoo abandoned this revision.
oontvoo added a comment.
In D113167#3110544 <https://reviews.llvm.org/D113167#3110544>, @smeenai wrote:
> Ah, got it. Took me a while to understand, because the combination of `N_WEAK_DEF` and `N_WEAK_REF` meaning autohide is incredibly confusing (sigh), but I get it now.
> If I'm understanding your comment correctly now, you're saying that it's incorrect for LLD to conflate the autohide case with the private extern case, which I agree with you about.
> After your patch, if I link your `hidden.cc` example with lld and add `-exported_symbol __Z3foov`, LLD is able to export the symbol, which seems incorrect. ld64 doesn't export the symbol, which makes sense to me.
Yep, I've realised that now :)
> Maybe we should be tracking autohide and private extern separately on symbols, to avoid this issue?
SG
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113167/new/
https://reviews.llvm.org/D113167
More information about the llvm-commits
mailing list