diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-09 19:57:29 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-12-09 19:57:29 +0000 |
| commit | 7e0a79318358051fe2b8947d85e84d1a3c9c282a (patch) | |
| tree | 6eb8effae55392de3227e13f649912d5221c215f /llvm | |
| parent | e283346d0bf47690e3008807b96721c95779b6e5 (diff) | |
| download | bcm5719-llvm-7e0a79318358051fe2b8947d85e84d1a3c9c282a.tar.gz bcm5719-llvm-7e0a79318358051fe2b8947d85e84d1a3c9c282a.zip | |
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.
llvm-svn: 146273
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 1 | ||||
| -rw-r--r-- | llvm/test/MC/ELF/relocation-386.s | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 14ca509d75f..40b84ae4585 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -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) { diff --git a/llvm/test/MC/ELF/relocation-386.s b/llvm/test/MC/ELF/relocation-386.s index 7604f9e1516..85da2eb8c94 100644 --- a/llvm/test/MC/ELF/relocation-386.s +++ b/llvm/test/MC/ELF/relocation-386.s @@ -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: |

