mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
Add support for tlsldm assembler operator to ARM target
The standard local dynamic model for TLS on ARM systems needs two relocations: - R_ARM_TLS_LDM32 (module idx) - R_ARM_TLS_LDO32 (offset of object from origin of module TLS block) In GNU style assembler we use symbol(tlsldm) and symbol(tlsldo) to produce these relocations. llvm-mc for ARM supports symbol(tlsldo) but does not support symbol(tlsldm). This patch wires up the existing symbol(tlsldm) to R_ARM_TLS_LDM32. TLS for ARM is defined in Addenda to, and Errata in, the ABI for the ARM Architecture Differential Revision: https://reviews.llvm.org/D22461 llvm-svn: 275977
This commit is contained in:
parent
c94489c306
commit
eee35f2834
@ -221,6 +221,9 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
case MCSymbolRefExpr::VK_TLSDESC:
|
||||
Type = ELF::R_ARM_TLS_GOTDESC;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_TLSLDM:
|
||||
Type = ELF::R_ARM_TLS_LDM32;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_ARM_TLSDESCSEQ:
|
||||
Type = ELF::R_ARM_TLS_DESCSEQ;
|
||||
break;
|
||||
|
@ -90,8 +90,14 @@ bl f05(plt)
|
||||
@CHECK: 68 R_ARM_PREL31 f26
|
||||
@CHECK: 6c R_ARM_PREL31 f27
|
||||
|
||||
@ tlsldm
|
||||
.word f28(TLSLDM)
|
||||
.word f29(tlsldm)
|
||||
@CHECK: 70 R_ARM_TLS_LDM32 f28
|
||||
@CHECK: 74 R_ARM_TLS_LDM32 f29
|
||||
|
||||
@ got_prel
|
||||
.word f28(GOT_PREL) + (. - .Lsym)
|
||||
ldr r3, =f29(GOT_PREL)
|
||||
@ CHECK: 70 R_ARM_GOT_PREL f28
|
||||
@ CHECK: 78 R_ARM_GOT_PREL f29
|
||||
.word f30(GOT_PREL) + (. - .Lsym)
|
||||
ldr r3, =f31(GOT_PREL)
|
||||
@ CHECK: 78 R_ARM_GOT_PREL f30
|
||||
@ CHECK: 80 R_ARM_GOT_PREL f31
|
||||
|
Loading…
Reference in New Issue
Block a user