From 26a49596d724c4b4ceead884ec9e26f743392590 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 5 Oct 2010 17:57:08 +0000 Subject: [PATCH] test/COFF: Fix symbol indexes and names. Update tests to match. llvm-svn: 115642 --- test/MC/COFF/basic-coff.ll | 10 +++++----- test/MC/COFF/symbol-fragment-offset.ll | 18 +++++++++--------- test/Scripts/coff-dump.py | 16 ++++++++++------ 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/test/MC/COFF/basic-coff.ll b/test/MC/COFF/basic-coff.ll index 29e02f0e0b1..bbf0d3ea5b0 100644 --- a/test/MC/COFF/basic-coff.ll +++ b/test/MC/COFF/basic-coff.ll @@ -44,13 +44,13 @@ declare i32 @printf(i8* nocapture, ...) nounwind ; CHECK: VirtualAddress = 0x{{[0-9A-F]+}} ; CHECK: SymbolTableIndex = 2 ; CHECK: Type = IMAGE_REL_I386_DIR32 (6) -; CHECK: SymbolName = +; CHECK: SymbolName = .data ; CHECK: } ; CHECK: 1 = { ; CHECK: VirtualAddress = 0x{{[0-9A-F]+}} ; CHECK: SymbolTableIndex = 5 ; CHECK: Type = IMAGE_REL_I386_REL32 (20) -; CHECK: SymbolName = _main +; CHECK: SymbolName = _printf ; CHECK: } ; CHECK: ] ; CHECK: } @@ -87,7 +87,7 @@ declare i32 @printf(i8* nocapture, ...) nounwind ; CHECK: 15 00 00 00 02 00 00 00 - 00 00 00 00 01 00 00 00 |................| ; CHECK: 00 00 |..| ; CHECK: } -; CHECK: 1 = { +; CHECK: 2 = { ; CHECK: Name = .data ; CHECK: Value = 0 ; CHECK: SectionNumber = 2 @@ -99,7 +99,7 @@ declare i32 @printf(i8* nocapture, ...) nounwind ; CHECK: 0C 00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |................| ; CHECK: 00 00 |..| ; CHECK: } -; CHECK: 2 = { +; CHECK: 4 = { ; CHECK: Name = _main ; CHECK: Value = 0 ; CHECK: SectionNumber = 1 @@ -109,7 +109,7 @@ declare i32 @printf(i8* nocapture, ...) nounwind ; CHECK: NumberOfAuxSymbols = 0 ; CHECK: AuxillaryData = ; CHECK: } -; CHECK: 3 = { +; CHECK: 5 = { ; CHECK: Name = _printf ; CHECK: Value = 0 ; CHECK: SectionNumber = 0 diff --git a/test/MC/COFF/symbol-fragment-offset.ll b/test/MC/COFF/symbol-fragment-offset.ll index 1f76e312e11..a8c917e0c41 100644 --- a/test/MC/COFF/symbol-fragment-offset.ll +++ b/test/MC/COFF/symbol-fragment-offset.ll @@ -48,25 +48,25 @@ declare i32 @puts(i8* nocapture) nounwind ; CHECK: VirtualAddress = 0x{{[0-9A-F]+}} ; CHECK: SymbolTableIndex = 2 ; CHECK: Type = IMAGE_REL_I386_DIR32 (6) -; CHECK: SymbolName = +; CHECK: SymbolName = .data ; CHECK: } ; CHECK: 1 = { ; CHECK: VirtualAddress = 0x{{[0-9A-F]+}} ; CHECK: SymbolTableIndex = 5 ; CHECK: Type = IMAGE_REL_I386_REL32 (20) -; CHECK: SymbolName = _main +; CHECK: SymbolName = _printf ; CHECK: } ; CHECK: 2 = { ; CHECK: VirtualAddress = 0x{{[0-9A-F]+}} ; CHECK: SymbolTableIndex = 6 ; CHECK: Type = IMAGE_REL_I386_DIR32 (6) -; CHECK: SymbolName = _printf +; CHECK: SymbolName = _str ; CHECK: } ; CHECK: 3 = { ; CHECK: VirtualAddress = 0x{{[0-9A-F]+}} ; CHECK: SymbolTableIndex = 7 ; CHECK: Type = IMAGE_REL_I386_REL32 (20) -; CHECK: SymbolName = _str +; CHECK: SymbolName = _puts ; CHECK: } ; CHECK: ] ; CHECK: } @@ -105,7 +105,7 @@ declare i32 @puts(i8* nocapture) nounwind ; CHECK: 00 00 |..| ; CHECK: } -; CHECK: 1 = { +; CHECK: 2 = { ; CHECK: Name = .data ; CHECK: Value = 0 ; CHECK: SectionNumber = 2 @@ -118,7 +118,7 @@ declare i32 @puts(i8* nocapture) nounwind ; CHECK: 00 00 |..| ; CHECK: } -; CHECK: 2 = { +; CHECK: 4 = { ; CHECK: Name = _main ; CHECK: Value = 0 ; CHECK: SectionNumber = 1 @@ -128,7 +128,7 @@ declare i32 @puts(i8* nocapture) nounwind ; CHECK: NumberOfAuxSymbols = 0 ; CHECK: AuxillaryData = -; CHECK: 3 = { +; CHECK: 5 = { ; CHECK: Name = _printf ; CHECK: Value = 0 ; CHECK: SectionNumber = 0 @@ -139,7 +139,7 @@ declare i32 @puts(i8* nocapture) nounwind ; CHECK: AuxillaryData = ; CHECK: } -; CHECK: 4 = { +; CHECK: 6 = { ; CHECK: Name = _str ; CHECK: Value = 7 ; CHECK: SectionNumber = 2 @@ -150,7 +150,7 @@ declare i32 @puts(i8* nocapture) nounwind ; CHECK: AuxillaryData = ; CHECK: } -; CHECK: 5 = { +; CHECK: 7 = { ; CHECK: Name = _puts ; CHECK: Value = 0 ; CHECK: SectionNumber = 0 diff --git a/test/Scripts/coff-dump.py b/test/Scripts/coff-dump.py index d734f0a0133..055fec5bde8 100755 --- a/test/Scripts/coff-dump.py +++ b/test/Scripts/coff-dump.py @@ -160,10 +160,10 @@ file = ('struct', [ 0x0010: 'IMAGE_REL_AMD64_SSPAN32', }, }))), - ('SymbolName', ('ptr', '+ PointerToSymbolTable * - SymbolTableIndex 1 18', ('scalar', '<8s', symname))) + ('SymbolName', ('ptr', '+ PointerToSymbolTable * SymbolTableIndex 18', ('scalar', '<8s', symname))) ])))), ]))), - ('Symbols', ('ptr', 'PointerToSymbolTable', ('byte-array', '* NumberOfSymbols 18', ('struct', [ + ('Symbols', ('ptr', 'PointerToSymbolTable', ('byte-array', '18', '* NumberOfSymbols 18', ('struct', [ ('Name', ('scalar', '<8s', symname)), ('Value', ('scalar', '