[PATCH] D77248: [llvm][IR] Add dso_local_equivalent Constant
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 15:37:03 PDT 2020
rjmccall added inline comments.
================
Comment at: llvm/docs/LangRef.rst:3784
+ may need to be emitted explicitly.
+- If the global is a variable or alias to a variable, this can be implemented
+ by copying the contents
----------------
pcc wrote:
> I would make this specific to functions. I don't think this can be made to work with globals at least with existing ELF linkers because I don't think you can get the copy relocation behavior without the symbol's value being overridden by the linkage unit with the copy relocation, and it doesn't make sense to have more than one linkage unit override the address of the same global.
Oh, does ELF's copy relocation necessarily steal the symbol so that it resolves into the copying linkage unit? I thought it might be separable so that you could just get a local copy of the data without changing symbol resolution. That would be a much more generically useful feature.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77248/new/
https://reviews.llvm.org/D77248
More information about the llvm-commits
mailing list