[PATCH] D97436: [lld-link] Fix addrsig symbols merging in ICF.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 13:47:56 PST 2021
rnk added a comment.
We had a user request to bring the "safe" and "all" ICF modes into alignment between the ports: https://crbug.com/1087923
I think LLD's /OPT:ICF behavior should match MSVC, which doesn't give you safe ICF, it should give you real ICF. So, I guess the thing to do is add a safeicf mode (/OPT:SAFEICF?), and then update these tests to use it.
LLD's current behavior is a bit emergent: we do safe ICF for non-executable data. That's pretty useful. Very few programs rely on function pointer address significance, but many programs do things like taking the address of a global and stuffing it in a hash table. The question is, should we have a mode that preserves this behavior? Fewer modes is better, but if we don't have a behavior preserving mode, Chrome either takes a binary size hit (safe ICF) or is potentially broken by global data ICF.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97436/new/
https://reviews.llvm.org/D97436
More information about the llvm-commits
mailing list