[PATCH] D71143: [ELF][Hexagon] Add support for TLS IE relocations
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 3 17:07:15 PST 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/Arch/Hexagon.cpp:123
+ case R_HEX_IE_LO16:
+ return R_GOT;
case R_HEX_GOTREL_11_X:
----------------
Is it really `R_GOT` (absolute), instead of `R_GOT_PC` (PC-relative)?
`R_GOT` is really only used by i386 because it lacks PC-relative instructions. This is a quite serious deficiency so x86_64 ISA and ABI have fixed the problem. (AArch64 does also use `R_GOT` but it has `bool AArch64::usesOnlyLowPageBits(RelType type)`, so using `R_GOT` is not a problem.)
================
Comment at: lld/test/ELF/hexagon-tls-ie.s:62
+# CHECK-RELA: 0x203C4 R_HEX_TPREL_32 a 0x0
+# CHECK-RELA: 0x203C8 R_HEX_TPREL_32 b 0x0
+# CHECK-RELA: 0x203CC R_HEX_TPREL_32 c 0x0
----------------
Use `-NEXT` is applicable. `CHECK-RELA-NEXT:` is too long. So you can consider using `RELA` as the check-prefix.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71143/new/
https://reviews.llvm.org/D71143
More information about the llvm-commits
mailing list