[PATCH] D70398: [lld] Support copy relocations for TLS symbols
Rich Felker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 11:01:42 PST 2019
dalias added a comment.
Copy relocations are extremely bad, in all places. They waste memory, possibly massive amounts (e.g. `const char libfoo_table[1<<24] = { ... };` in a library transforms from 16M of shared text to 16M of per-instance data), and they make the size of structures and arrays exported from shared libraries part of the ABI (precluding extending them at the end in future library versions). They should not be used anywhere, and the only historical reason they exist at all is that, prior to the existence of shared libraries, the existing ABIs on platforms at the time allowed absolute references to data objects embedded in program text. There is no good reason to allow this on new architectures not encumbered by such legacy ABIs, and certainly no reason to introduce it for TLS, where the extreme memory waste is not per-process but per-thread.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70398/new/
https://reviews.llvm.org/D70398
More information about the llvm-commits
mailing list