diff options
| author | Rui Ueyama <ruiu@google.com> | 2014-03-21 00:44:19 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2014-03-21 00:44:19 +0000 |
| commit | 827c8a2b077466a008a93e69546b7902361df177 (patch) | |
| tree | b8b3b39d50a8d4cd5beed2bcba9b63c245cc9fb7 /llvm/test/tools/llvm-objdump/coff-many-relocs.test | |
| parent | 56be75426286b324b209a0932967b2e79ef6cee4 (diff) | |
| download | bcm5719-llvm-827c8a2b077466a008a93e69546b7902361df177.tar.gz bcm5719-llvm-827c8a2b077466a008a93e69546b7902361df177.zip | |
Object/COFF: Support large relocation table.
NumberOfRelocations field in COFF section table is only 16-bit wide. If an
object has more than 65535 relocations, the number of relocations is stored
to VirtualAddress field in the first relocation field, and a special flag
(IMAGE_SCN_LNK_NRELOC_OVFL) is set to Characteristics field.
In test we cheated a bit. I made up a test file so that it has
IMAGE_SCN_LNK_NRELOC_OVFL flag but the number of relocations is much smaller
than 65535. This is to avoid checking in a large test file just to test a
file with many relocations.
Differential Revision: http://llvm-reviews.chandlerc.com/D3139
llvm-svn: 204418
Diffstat (limited to 'llvm/test/tools/llvm-objdump/coff-many-relocs.test')
| -rw-r--r-- | llvm/test/tools/llvm-objdump/coff-many-relocs.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/coff-many-relocs.test b/llvm/test/tools/llvm-objdump/coff-many-relocs.test new file mode 100644 index 00000000000..d6d0d608b3b --- /dev/null +++ b/llvm/test/tools/llvm-objdump/coff-many-relocs.test @@ -0,0 +1,14 @@ +// Test that llvm-objdump can handle IMAGE_SCN_LNK_NRELOC_OVFL. +// RUN: llvm-objdump -r %p/Inputs/many-relocs.obj-i386 | FileCheck %s + +CHECK: RELOCATION RECORDS FOR [.text]: +CHECK-NEXT: IMAGE_REL_I386_DIR16 foo +CHECK-NEXT: IMAGE_REL_I386_REL16 foo +CHECK-NEXT: IMAGE_REL_I386_DIR32 foo +CHECK-NEXT: IMAGE_REL_I386_DIR32NB foo +CHECK-NEXT: IMAGE_REL_I386_SEG12 foo +CHECK-NEXT: IMAGE_REL_I386_SECTION foo +CHECK-NEXT: IMAGE_REL_I386_SECREL foo +CHECK-NEXT: IMAGE_REL_I386_TOKEN foo +CHECK-NEXT: IMAGE_REL_I386_SECREL7 foo +CHECK-NEXT: IMAGE_REL_I386_REL32 foo |

