mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
14b8467bd2
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
15 lines
556 B
Plaintext
15 lines
556 B
Plaintext
// 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
|