[PATCH] D18026: [lld] [ELF/AArch64] Fix TLS IE to LE relax for local symbols
Adhemerval Zanella via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 01:37:22 PST 2016
zatrazz added inline comments.
================
Comment at: ELF/Target.cpp:1531
@@ -1531,3 +1530,3 @@
case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
- relocateTlsIeToLe(Type, Loc, BufEnd, P, S->getVA<ELF64LE>());
+ relocateTlsIeToLe(Type, Loc, BufEnd, P, SA);
return 0;
----------------
ruiu wrote:
> What is this change for?
The logic is wrong for local symbols, where S is nullptr. At ELF/InputSection.cpp:219, if the Body is nullptr then it uses getLocalRelTarget. Also the change on 'AArch64TargetInfo::needsGot' is to make the same code uses getVA instead of getGotVA.
================
Comment at: test/ELF/aarch64-tls-iele.s:17
@@ +16,3 @@
+#CHECK: 11004: 80 02 80 f2 movk x0, #0x14
+#CHECK: 11008: 00 00 a0 d2 movz x0, #0, lsl #16
+#CHECK: 1100c: 00 02 80 f2 movk x0, #0x10
----------------
grimar wrote:
> Please align accordinly, remove space after ':'
>
> ```
> 11000: 00 00 a0 d2 movz x0, #0, lsl #16
> 11004: 80 02 80 f2 movk x0, #0x14
> 11008: 00 00 a0 d2 movz x0, #0, lsl #16
> ```
>
> Second is that you probably want to use "CHECK-NEXT":
>
> ```
> # CHECK: 11000: 00 00 a0 d2 movz x0, #0, lsl #16
> # CHECK-NEXT: 11004: 80 02 80 f2 movk x0, #0x14
> # CHECK-NEXT: 11008: 00 00 a0 d2 movz x0, #0, lsl #16
>
> ```
> And the last is that this testcase contains different spacing style:
> "# RUN" vs "#CHECK" for example. Please choose one style to follow in a single test. That probably should be fixed separatelly.
>
Yes, the spacing is weird, I will fix it.
Repository:
rL LLVM
http://reviews.llvm.org/D18026
More information about the llvm-commits
mailing list