[lld] r301964 - Fix misnamed #include. Remove _NC suffix from ELF relocations TLSDESC_{LD64, ADD}_LO12
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 13:34:24 PDT 2017
This broke the build, so I reverted it.
Cheers,
Rafael
Joel Jones via llvm-commits <llvm-commits at lists.llvm.org> writes:
> Author: joel_k_jones
> Date: Tue May 2 14:31:40 2017
> New Revision: 301964
>
> URL: http://llvm.org/viewvc/llvm-project?rev=301964&view=rev
> Log:
> Fix misnamed #include. Remove _NC suffix from ELF relocations TLSDESC_{LD64,ADD}_LO12
>
> Modified:
> lld/trunk/COFF/PDB.cpp
> lld/trunk/ELF/Target.cpp
>
> Modified: lld/trunk/COFF/PDB.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=301964&r1=301963&r2=301964&view=diff
> ==============================================================================
> --- lld/trunk/COFF/PDB.cpp (original)
> +++ lld/trunk/COFF/PDB.cpp Tue May 2 14:31:40 2017
> @@ -28,7 +28,7 @@
> #include "llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h"
> #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
> #include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h"
> -#include "llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h"
> +#include "llvm/DebugInfo/PDB/Native/StringTableBuilder.h"
> #include "llvm/DebugInfo/PDB/Native/PDBTypeServerHandler.h"
> #include "llvm/DebugInfo/PDB/Native/TpiStream.h"
> #include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h"
>
> Modified: lld/trunk/ELF/Target.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=301964&r1=301963&r2=301964&view=diff
> ==============================================================================
> --- lld/trunk/ELF/Target.cpp (original)
> +++ lld/trunk/ELF/Target.cpp Tue May 2 14:31:40 2017
> @@ -1324,8 +1324,8 @@ RelExpr AArch64TargetInfo::getRelExpr(ui
> return R_ABS;
> case R_AARCH64_TLSDESC_ADR_PAGE21:
> return R_TLSDESC_PAGE;
> - case R_AARCH64_TLSDESC_LD64_LO12_NC:
> - case R_AARCH64_TLSDESC_ADD_LO12_NC:
> + case R_AARCH64_TLSDESC_LD64_LO12:
> + case R_AARCH64_TLSDESC_ADD_LO12:
> return R_TLSDESC;
> case R_AARCH64_TLSDESC_CALL:
> return R_TLSDESC_CALL;
> @@ -1376,8 +1376,8 @@ bool AArch64TargetInfo::usesOnlyLowPageB
> case R_AARCH64_LDST32_ABS_LO12_NC:
> case R_AARCH64_LDST64_ABS_LO12_NC:
> case R_AARCH64_LDST8_ABS_LO12_NC:
> - case R_AARCH64_TLSDESC_ADD_LO12_NC:
> - case R_AARCH64_TLSDESC_LD64_LO12_NC:
> + case R_AARCH64_TLSDESC_ADD_LO12:
> + case R_AARCH64_TLSDESC_LD64_LO12:
> case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
> return true;
> }
> @@ -1503,7 +1503,7 @@ void AArch64TargetInfo::relocateOne(uint
> break;
> case R_AARCH64_LD64_GOT_LO12_NC:
> case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
> - case R_AARCH64_TLSDESC_LD64_LO12_NC:
> + case R_AARCH64_TLSDESC_LD64_LO12:
> checkAlignment<8>(Loc, Val, Type);
> or32le(Loc, (Val & 0xFF8) << 7);
> break;
> @@ -1543,7 +1543,7 @@ void AArch64TargetInfo::relocateOne(uint
> or32AArch64Imm(Loc, Val >> 12);
> break;
> case R_AARCH64_TLSLE_ADD_TPREL_LO12_NC:
> - case R_AARCH64_TLSDESC_ADD_LO12_NC:
> + case R_AARCH64_TLSDESC_ADD_LO12:
> or32AArch64Imm(Loc, Val);
> break;
> default:
> @@ -1555,8 +1555,8 @@ void AArch64TargetInfo::relaxTlsGdToLe(u
> uint64_t Val) const {
> // TLSDESC Global-Dynamic relocation are in the form:
> // adrp x0, :tlsdesc:v [R_AARCH64_TLSDESC_ADR_PAGE21]
> - // ldr x1, [x0, #:tlsdesc_lo12:v [R_AARCH64_TLSDESC_LD64_LO12_NC]
> - // add x0, x0, :tlsdesc_los:v [_AARCH64_TLSDESC_ADD_LO12_NC]
> + // ldr x1, [x0, #:tlsdesc_lo12:v [R_AARCH64_TLSDESC_LD64_LO12]
> + // add x0, x0, :tlsdesc_los:v [R_AARCH64_TLSDESC_ADD_LO12]
> // .tlsdesccall [R_AARCH64_TLSDESC_CALL]
> // blr x1
> // And it can optimized to:
> @@ -1567,14 +1567,14 @@ void AArch64TargetInfo::relaxTlsGdToLe(u
> checkUInt<32>(Loc, Val, Type);
>
> switch (Type) {
> - case R_AARCH64_TLSDESC_ADD_LO12_NC:
> + case R_AARCH64_TLSDESC_ADD_LO12:
> case R_AARCH64_TLSDESC_CALL:
> write32le(Loc, 0xd503201f); // nop
> return;
> case R_AARCH64_TLSDESC_ADR_PAGE21:
> write32le(Loc, 0xd2a00000 | (((Val >> 16) & 0xffff) << 5)); // movz
> return;
> - case R_AARCH64_TLSDESC_LD64_LO12_NC:
> + case R_AARCH64_TLSDESC_LD64_LO12:
> write32le(Loc, 0xf2800000 | ((Val & 0xffff) << 5)); // movk
> return;
> default:
> @@ -1586,8 +1586,8 @@ void AArch64TargetInfo::relaxTlsGdToIe(u
> uint64_t Val) const {
> // TLSDESC Global-Dynamic relocation are in the form:
> // adrp x0, :tlsdesc:v [R_AARCH64_TLSDESC_ADR_PAGE21]
> - // ldr x1, [x0, #:tlsdesc_lo12:v [R_AARCH64_TLSDESC_LD64_LO12_NC]
> - // add x0, x0, :tlsdesc_los:v [_AARCH64_TLSDESC_ADD_LO12_NC]
> + // ldr x1, [x0, #:tlsdesc_lo12:v [R_AARCH64_TLSDESC_LD64_LO12]
> + // add x0, x0, :tlsdesc_los:v [R_AARCH64_TLSDESC_ADD_LO12]
> // .tlsdesccall [R_AARCH64_TLSDESC_CALL]
> // blr x1
> // And it can optimized to:
> @@ -1597,7 +1597,7 @@ void AArch64TargetInfo::relaxTlsGdToIe(u
> // nop
>
> switch (Type) {
> - case R_AARCH64_TLSDESC_ADD_LO12_NC:
> + case R_AARCH64_TLSDESC_ADD_LO12:
> case R_AARCH64_TLSDESC_CALL:
> write32le(Loc, 0xd503201f); // nop
> break;
> @@ -1605,7 +1605,7 @@ void AArch64TargetInfo::relaxTlsGdToIe(u
> write32le(Loc, 0x90000000); // adrp
> relocateOne(Loc, R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, Val);
> break;
> - case R_AARCH64_TLSDESC_LD64_LO12_NC:
> + case R_AARCH64_TLSDESC_LD64_LO12:
> write32le(Loc, 0xf9400000); // ldr
> relocateOne(Loc, R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, Val);
> break;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list