Add a test for r221870

bad-relocs.obj.coff-i386 has a relocation whose symbol index is outside
the symbol table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222413 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2014-11-20 05:32:10 +00:00
parent 136d5aeba4
commit 9dda78ff11
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,7 @@
RUN: llvm-readobj -r %p/Inputs/trivial.obj.coff-i386 \
RUN: | FileCheck %s -check-prefix COFF
RUN: llvm-readobj -r %p/Inputs/bad-relocs.obj.coff-i386 \
RUN: | FileCheck %s -check-prefix BAD-COFF-RELOCS
RUN: llvm-readobj -r %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF
RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-i386 \
@ -21,6 +23,12 @@ COFF-NEXT: 0xE IMAGE_REL_I386_REL32 _SomeOtherFunction
COFF-NEXT: }
COFF-NEXT: ]
BAD-COFF-RELOCS: Relocations [
BAD-COFF-RELOCS-NEXT: Section (1) sec {
BAD-COFF-RELOCS-NEXT: 0xDEADBEEF IMAGE_REL_I386_ABSOLUTE -
BAD-COFF-RELOCS-NEXT: }
BAD-COFF-RELOCS-NEXT: ]
ELF: Relocations [
ELF-NEXT: Section (2) .rel.text {
ELF-NEXT: 0xC R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0