ELF: Do not create copy relocations for references in writable sections.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 14 Apr 2016 01:48:11 +0000 (01:48 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 14 Apr 2016 01:48:11 +0000 (01:48 +0000)
commit0a68cf50f85443b3525c54a0d9026e84781d2905
tree0922c5c8e8f8106c5337d4fb63ee4879f8088434
parent9cd90712f0f47f13173e0c4aaec8081d97aef81c
ELF: Do not create copy relocations for references in writable sections.

They are unnecessary, as the dynamic loader can apply the original relocations
directly. This was also resulting in the creation of copy relocations in PIEs.

Differential Revision: http://reviews.llvm.org/D19089

llvm-svn: 266273
lld/ELF/Writer.cpp
lld/test/ELF/aarch64-copy.s
lld/test/ELF/mips-plt-copy.s
lld/test/ELF/relocation-copy-flags.s [moved from lld/test/ELF/relocation-copy-non-alloc.s with 66% similarity]