1 // Verify the
.fix data section conveys the right offsets and the right relocations
2 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-win32
%s
-o
- | llvm-readobj
-r
--expand-relocs
-S
--section-data
- | FileCheck
%s
--check-prefix
=READOBJ
60 // As an extension
, we allow
64-bit label differences. They lower to
61 // IMAGE_REL_AMD64_REL32 because IMAGE_REL_AMD64_REL64 does
not exist.
66 // READOBJ
: Name
: .fix (2E 66 69 78 00 00 00 00)
67 // READOBJ-NEXT
: VirtualSize
: 0x0
68 // READOBJ-NEXT
: VirtualAddress
: 0x0
69 // READOBJ-NEXT
: RawDataSize
:
70 // READOBJ-NEXT
: PointerToRawData
: 0xEC
71 // READOBJ-NEXT
: PointerToRelocations
:
72 // READOBJ-NEXT
: PointerToLineNumbers
: 0x0
73 // READOBJ-NEXT
: RelocationCount
:
74 // READOBJ-NEXT
: LineNumberCount
: 0
75 // READOBJ-NEXT
: Characteristics
[ (0xC0500040)
76 // READOBJ-NEXT
: IMAGE_SCN_ALIGN_16BYTES
(0x500000)
77 // READOBJ-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
(0x40)
78 // READOBJ-NEXT
: IMAGE_SCN_MEM_READ
(0x40000000)
79 // READOBJ-NEXT
: IMAGE_SCN_MEM_WRITE
(0x80000000)
81 // READOBJ-NEXT
: SectionData
(
82 // READOBJ-NEXT
: 0000: 04000000 00000000 00000000 00000000 |
83 // READOBJ-NEXT
: 0010: 01020000 00000000 00010000 00000000 |
84 // READOBJ-NEXT
: 0020: 04000000 00000000 04000000 04000000 |
85 // READOBJ-NEXT
: 0030: 00000000 |
89 // READOBJ-NEXT
: Relocations
[
90 // READOBJ-NEXT
: Section
(5) .fix {
91 // READOBJ-NEXT
: Relocation
{
92 // READOBJ-NEXT
: Offset
: 0x0
93 // READOBJ-NEXT
: Type
: IMAGE_REL_AMD64_REL32
(4)
94 // READOBJ-NEXT
: Symbol
: g3
95 // READOBJ-NEXT
: SymbolIndex
: 12
97 // READOBJ-NEXT
: Relocation
{
98 // READOBJ-NEXT
: Offset
: 0x4
99 // READOBJ-NEXT
: Type
: IMAGE_REL_AMD64_ADDR32NB
(3)
100 // READOBJ-NEXT
: Symbol
: g3
101 // READOBJ-NEXT
: SymbolIndex
: 12
103 // READOBJ-NEXT
: Relocation
{
104 // READOBJ-NEXT
: Offset
: 0x20
105 // READOBJ-NEXT
: Type
: IMAGE_REL_AMD64_REL32
(4)
106 // READOBJ-NEXT
: Symbol
: g3
107 // READOBJ-NEXT
: SymbolIndex
: 12
109 // READOBJ-NEXT
: Relocation
{
110 // READOBJ-NEXT
: Offset
: 0x28
111 // READOBJ-NEXT
: Type
: IMAGE_REL_AMD64_REL32
(4)
112 // READOBJ-NEXT
: Symbol
: foobar
113 // READOBJ-NEXT
: SymbolIndex
: 20
115 // READOBJ-NEXT
: Relocation
{
116 // READOBJ-NEXT
: Offset
: 0x2C
117 // READOBJ-NEXT
: Type
: IMAGE_REL_AMD64_REL32
(4)
118 // READOBJ-NEXT
: Symbol
: foobar
119 // READOBJ-NEXT
: SymbolIndex
: 20