Index: lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp +++ lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp @@ -221,6 +221,9 @@ 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; Index: test/MC/ARM/symbol-variants.s =================================================================== --- test/MC/ARM/symbol-variants.s +++ test/MC/ARM/symbol-variants.s @@ -90,8 +90,14 @@ @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