git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113928
91177308-0d34-0410-b5e6-
96231b3b80d8
; CHECK: SizeOfOptionalHeader = 0
; CHECK: Characteristics = 0x0
; CHECK: Sections = [
; CHECK: SizeOfOptionalHeader = 0
; CHECK: Characteristics = 0x0
; CHECK: Sections = [
; CHECK: Name = .text
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
; CHECK: Name = .text
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
; CHECK: }
; CHECK: ]
; CHECK: }
; CHECK: }
; CHECK: ]
; CHECK: }
; CHECK: Name = .data
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
; CHECK: Name = .data
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
; CHECK: SizeOfOptionalHeader = 0\r
; CHECK: Characteristics = 0x0\r
; CHECK: Sections = [\r
; CHECK: SizeOfOptionalHeader = 0\r
; CHECK: Characteristics = 0x0\r
; CHECK: Sections = [\r
; CHECK: Name = .text\r
; CHECK: VirtualSize = 0\r
; CHECK: VirtualAddress = 0\r
; CHECK: Name = .text\r
; CHECK: VirtualSize = 0\r
; CHECK: VirtualAddress = 0\r
; CHECK: }\r
; CHECK: ]\r
; CHECK: }\r
; CHECK: }\r
; CHECK: ]\r
; CHECK: }\r
; CHECK: Name = .data\r
; CHECK: VirtualSize = 0\r
; CHECK: VirtualAddress = 0\r
; CHECK: Name = .data\r
; CHECK: VirtualSize = 0\r
; CHECK: VirtualAddress = 0\r
(0x4000, 'IMAGE_FILE_UP_SYSTEM_ONLY', ),
(0x8000, 'IMAGE_FILE_BYTES_REVERSED_HI', ),
])),
(0x4000, 'IMAGE_FILE_UP_SYSTEM_ONLY', ),
(0x8000, 'IMAGE_FILE_BYTES_REVERSED_HI', ),
])),
- ('Sections', ('array', 'NumberOfSections', ('struct', [
+ ('Sections', ('array', '1', 'NumberOfSections', ('struct', [
('Name', ('scalar', '<8s', secname)),
('VirtualSize', ('scalar', '<L', '%d' )),
('VirtualAddress', ('scalar', '<L', '%d' )),
('Name', ('scalar', '<8s', secname)),
('VirtualSize', ('scalar', '<L', '%d' )),
('VirtualAddress', ('scalar', '<L', '%d' )),
(0x80000000, 'IMAGE_SCN_MEM_WRITE'),
])),
('SectionData', ('ptr', 'PointerToRawData', ('blob', 'SizeOfRawData'))),
(0x80000000, 'IMAGE_SCN_MEM_WRITE'),
])),
('SectionData', ('ptr', 'PointerToRawData', ('blob', 'SizeOfRawData'))),
- ('Relocations', ('ptr', 'PointerToRelocations', ('array', 'NumberOfRelocations', ('struct', [
+ ('Relocations', ('ptr', 'PointerToRelocations', ('array', '0', 'NumberOfRelocations', ('struct', [
('VirtualAddress', ('scalar', '<L', '0x%X')),
('SymbolTableIndex', ('scalar', '<L', '%d' )),
('Type', ('enum', '<H', '%d', ('MachineType', {
('VirtualAddress', ('scalar', '<L', '0x%X')),
('SymbolTableIndex', ('scalar', '<L', '%d' )),
('Type', ('enum', '<H', '%d', ('MachineType', {
return newFields
def handle_array(entry):
return newFields
def handle_array(entry):
- length = entry[1]
- element = entry[2]
+ start_index = entry[1]
+ length = entry[2]
+ element = entry[3]
newItems = []
write("[\n")
indent()
newItems = []
write("[\n")
indent()
+ start_index = read_value(start_index)
value = read_value(length)
for index in xrange(value):
value = read_value(length)
for index in xrange(value):
+ write("%d = " % (index + start_index))
value = handle_element(element)
write("\n")
newItems.append(value)
value = handle_element(element)
write("\n")
newItems.append(value)