Implement R_X86_64_DTPOFF32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2010-10-28 15:11:03 +00:00
parent b4d1721eff
commit aa8f1f0135
2 changed files with 10 additions and 0 deletions

View File

@ -728,6 +728,9 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
case MCSymbolRefExpr::VK_TPOFF:
Type = ELF::R_X86_64_TPOFF32;
break;
case MCSymbolRefExpr::VK_DTPOFF:
Type = ELF::R_X86_64_DTPOFF32;
break;
}
break;
case FK_Data_4:

View File

@ -13,6 +13,7 @@ bar:
leaq foo@TLSGD(%rip), %rax # R_X86_64_TLSGD
leaq foo@TPOFF(%rax), %rax # R_X86_64_TPOFF32
leaq foo@TLSLD(%rip), %rdi # R_X86_64_TLSLD
leaq foo@DTPOFF(%rax), %rcx # R_X86_64_DTPOFF32
// CHECK: # Section 0x00000001
// CHECK: (('sh_name', 0x00000001) # '.text'
@ -83,3 +84,9 @@ bar:
// CHECK-NEXT: ('r_sym', 0x00000006)
// CHECK-NEXT: ('r_type', 0x00000014)
// CHECK-NEXT: ('r_addend', 0xfffffffc)
// CHECK: # Relocation 0x0000000a
// CHECK-NEXT: (('r_offset', 0x00000049)
// CHECK-NEXT: ('r_sym', 0x00000006)
// CHECK-NEXT: ('r_type', 0x00000015)
// CHECK-NEXT: ('r_addend', 0x00000000)