mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
Implement R_386_GOT32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116744 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a8702eaf78
commit
eada304793
@ -706,6 +706,9 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
|
||||
switch (Modifier) {
|
||||
default:
|
||||
llvm_unreachable("Unimplemented");
|
||||
case MCSymbolRefExpr::VK_GOT:
|
||||
Type = ELF::R_386_GOT32;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_GOTOFF:
|
||||
Type = ELF::R_386_GOTOFF;
|
||||
break;
|
||||
|
@ -36,11 +36,18 @@
|
||||
// CHECK-NEXT: ('r_type', 10)
|
||||
// CHECK-NEXT: ),
|
||||
|
||||
// Relocation 3 (bar3@GOTOFF) is done symbol 6 (bss)
|
||||
// Relocation 3 (bar3@GOTOFF) is done with symbol 6 (bss)
|
||||
// CHECK-NEXT: # Relocation 3
|
||||
// CHECK-NEXT: (('r_offset',
|
||||
// CHECK-NEXT: ('r_sym', 6
|
||||
// CHECK-NEXT: ('r_type',
|
||||
// CHECK-NEXT: ),
|
||||
|
||||
// Relocation 4 (bar2@GOT) is of type R_386_GOT32
|
||||
// CHECK-NEXT: # Relocation 4
|
||||
// CHECK-NEXT: (('r_offset',
|
||||
// CHECK-NEXT: ('r_sym',
|
||||
// CHECK-NEXT: ('r_type', 3
|
||||
// CHECK-NEXT: ),
|
||||
|
||||
.text
|
||||
@ -57,6 +64,8 @@ bar2:
|
||||
.local bar3
|
||||
.comm bar3,1,1
|
||||
|
||||
movl bar2j@GOT(%eax), %eax
|
||||
|
||||
.section .rodata.str1.16,"aMS",@progbits,1
|
||||
.Lfoo:
|
||||
.asciz "bool llvm::llvm_start_multithreaded()"
|
||||
|
Loading…
Reference in New Issue
Block a user