[PATCH] D56779: [ELF][X86_64] Fix corrupted LD -> LE optimization for TLS without PLT
Peter Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 16 11:14:44 PST 2019
Lekensteyn marked an inline comment as done.
Lekensteyn added inline comments.
================
Comment at: ELF/Arch/X86_64.cpp:267-275
// Convert
- // leaq bar at tlsld(%rip), %rdi
- // callq __tls_get_addr at PLT
+ // leaq bar at tlsld(%rip), %rdi # 48 8d 3d <Loc>
+ // callq __tls_get_addr at PLT # e8 <disp32>
// leaq bar at dtpoff(%rax), %rcx
// to
// .word 0x6666
// .byte 0x66
----------------
ruiu wrote:
> Now this comment is at a wrong place? It looks like this comment explains the entire function, but I believe now this comment explains on the first "if" condition.
The comment indeed describes the `if (NextOp == 0xe8) {` case below, except for the third instruction (related to dtpoff). How is that last instruction handled?
I kept the comment here because I thought that the `if (Type == R_X86_DTPOFF*) {` blocks took care of it. I can move it down, but this part I did not understand.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56779/new/
https://reviews.llvm.org/D56779
More information about the llvm-commits
mailing list