mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Add support for @GOTPTOFF in i386 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132643 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1777299737
commit
e0b87032f5
@ -1720,6 +1720,9 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target,
|
||||
case MCSymbolRefExpr::VK_DTPOFF:
|
||||
Type = ELF::R_386_TLS_LDO_32;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_GOTTPOFF:
|
||||
Type = ELF::R_386_TLS_IE_32;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FK_Data_2: Type = ELF::R_386_16; break;
|
||||
|
@ -153,6 +153,13 @@
|
||||
// CHECK-NEXT: ('r_sym',
|
||||
// CHECK-NEXT: ('r_type', 0x00000001)
|
||||
// CHECK-NEXT: ),
|
||||
// Relocation 24 (foo@GOTTPOFF(%edx)) is of type R_386_TLS_IE_32 and uses the
|
||||
// symbol
|
||||
// CHECK-NEXT: Relocation 0x00000018
|
||||
// CHECK-NEXT: (('r_offset', 0x0000008e)
|
||||
// CHECK-NEXT: ('r_sym', 0x0000000d)
|
||||
// CHECK-NEXT: ('r_type', 0x00000021)
|
||||
// CHECK-NEXT: ),
|
||||
|
||||
// Section 4 is bss
|
||||
// CHECK: # Section 0x00000004
|
||||
@ -217,6 +224,7 @@ bar2:
|
||||
movl zed@TPOFF(%eax), %eax
|
||||
movl zed@DTPOFF(%eax), %eax
|
||||
pushl $bar
|
||||
addl foo@GOTTPOFF(%edx), %eax
|
||||
|
||||
.section zedsec,"awT",@progbits
|
||||
zed:
|
||||
|
Loading…
Reference in New Issue
Block a user