Handle reloc_signed_4byte in here. Not doing so was a regression from my

previous commit. It is strange that we see it in 32 bits. We already
have a fixme about it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146273 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2011-12-09 19:57:29 +00:00
parent 493ad6b95d
commit 3c68acd202
2 changed files with 9 additions and 0 deletions

View File

@ -1749,6 +1749,7 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target,
Type = ELF::R_386_GOTPC;
break;
case X86::reloc_signed_4byte:
case FK_PCRel_4:
case FK_Data_4:
switch (Modifier) {

View File

@ -165,6 +165,13 @@
// CHECK-NEXT: (('r_offset', 0x00000094)
// CHECK-NEXT: ('r_sym', 0x00000b)
// CHECK-NEXT: ('r_type', 0x0a)
// CHECK-NEXT: ),
// Relocation 26 (und_symbol-bar2) is of type R_386_PC32
// CHECK-NEXT: Relocation 26
// CHECK-NEXT: (('r_offset', 0x0000009a)
// CHECK-NEXT: ('r_sym', 0x00000e)
// CHECK-NEXT: ('r_type', 0x02)
// CHECK-NEXT: ),
// Section 4 is bss
// CHECK: # Section 4
@ -231,6 +238,7 @@ bar2:
pushl $bar
addl foo@GOTTPOFF(%edx), %eax
subl _GLOBAL_OFFSET_TABLE_-bar2, %ebx
leal und_symbol-bar2(%edx),%ecx
.section zedsec,"awT",@progbits
zed: