commit | 5391489674555fc1835530b2eea727b727d96b7a | [log] [tgz] |
---|---|---|
author | Peter Wu <peter@lekensteyn.nl> | Wed Jan 16 23:28:51 2019 +0000 |
committer | Peter Wu <peter@lekensteyn.nl> | Wed Jan 16 23:28:51 2019 +0000 |
tree | e912cfba2c82bcf55861675d94289d0a3019dd40 | |
parent | 669edb5ce5fe5b71e9850e420126c2ef50499dcd [diff] |
[ELF][X86_64] Fix corrupted LD -> LE optimization for TLS without PLT The LD -> LE optimization for Thread-Local Storage without PLT requires an additional "66" prefix, otherwise the next instruction will be corrupted, causing runtime misbehavior (crashes) of the linked object. The other (GD -> IE/LD) optimizations are the same with or without PLT, but add tests for completeness. The instructions are copied from https://raw.githubusercontent.com/wiki/hjl-tools/x86-psABI/x86-64-psABI-1.0.pdf#subsection.11.1.2 This does not try to address ILP32 (x32) support. Fixes https://bugs.llvm.org/show_bug.cgi?id=37303 Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D56779 llvm-svn: 351396