[PATCH] D135082: [lld-macho] Mark aliased symbols as noDeadStrip
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 3 16:17:20 PDT 2022
int3 added a comment.
I played around with the test a bit and I realized that ld64 doesn't actually dead-strip `_foo` if `.subsections_via_symbols` isn't there (even though `_foo` and `_main` are in separate files and therefore separate sections...)
With .subsections_via_symbols added, I noticed that ld64 does actually dead-strip `_bar` (but not `_foo`!). I am not really sure that behavior makes sense, presumably an alias exists so that some other library can look up the aliasing symbol name, not the aliased symbol name...
So I think we should add .subsections_via_symbols + add a comment to the test describing this deviation from ld64
I will look into N_INDR shortly...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135082/new/
https://reviews.llvm.org/D135082
More information about the llvm-commits
mailing list