[llvm-commits] [llvm] r113928 - in /llvm/trunk/test: MC/COFF/basic-coff.ll MC/COFF/symbol-fragment-offset.ll Scripts/coff-dump.py
Michael J. Spencer
bigcheesegs at gmail.com
Tue Sep 14 20:58:52 PDT 2010
Author: mspencer
Date: Tue Sep 14 22:58:51 2010
New Revision: 113928
URL: http://llvm.org/viewvc/llvm-project?rev=113928&view=rev
Log:
test: Fix coff-dump section array indicies to 1 based to match file format.
Modified:
llvm/trunk/test/MC/COFF/basic-coff.ll
llvm/trunk/test/MC/COFF/symbol-fragment-offset.ll
llvm/trunk/test/Scripts/coff-dump.py
Modified: llvm/trunk/test/MC/COFF/basic-coff.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/basic-coff.ll?rev=113928&r1=113927&r2=113928&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/basic-coff.ll (original)
+++ llvm/trunk/test/MC/COFF/basic-coff.ll Tue Sep 14 22:58:51 2010
@@ -24,7 +24,7 @@
; CHECK: SizeOfOptionalHeader = 0
; CHECK: Characteristics = 0x0
; CHECK: Sections = [
-; CHECK: 0 = {
+; CHECK: 1 = {
; CHECK: Name = .text
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
@@ -57,7 +57,7 @@
; CHECK: }
; CHECK: ]
; CHECK: }
-; CHECK: 1 = {
+; CHECK: 2 = {
; CHECK: Name = .data
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
Modified: llvm/trunk/test/MC/COFF/symbol-fragment-offset.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/symbol-fragment-offset.ll?rev=113928&r1=113927&r2=113928&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/symbol-fragment-offset.ll (original)
+++ llvm/trunk/test/MC/COFF/symbol-fragment-offset.ll Tue Sep 14 22:58:51 2010
@@ -28,7 +28,7 @@
; CHECK: SizeOfOptionalHeader = 0
; CHECK: Characteristics = 0x0
; CHECK: Sections = [
-; CHECK: 0 = {
+; CHECK: 1 = {
; CHECK: Name = .text
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
@@ -75,7 +75,7 @@
; CHECK: }
; CHECK: ]
; CHECK: }
-; CHECK: 1 = {
+; CHECK: 2 = {
; CHECK: Name = .data
; CHECK: VirtualSize = 0
; CHECK: VirtualAddress = 0
Modified: llvm/trunk/test/Scripts/coff-dump.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Scripts/coff-dump.py?rev=113928&r1=113927&r2=113928&view=diff
==============================================================================
--- llvm/trunk/test/Scripts/coff-dump.py (original)
+++ llvm/trunk/test/Scripts/coff-dump.py Tue Sep 14 22:58:51 2010
@@ -73,7 +73,7 @@
(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' )),
@@ -123,7 +123,7 @@
(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', {
@@ -463,18 +463,20 @@
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()
+ start_index = read_value(start_index)
value = read_value(length)
for index in xrange(value):
- write("%d = "%index)
+ write("%d = " % (index + start_index))
value = handle_element(element)
write("\n")
newItems.append(value)
More information about the llvm-commits
mailing list