diff options
Diffstat (limited to 'test/MC/AsmParser')
-rw-r--r-- | test/MC/AsmParser/section.s | 144 | ||||
-rw-r--r-- | test/MC/AsmParser/section_names.s | 62 |
2 files changed, 114 insertions, 92 deletions
diff --git a/test/MC/AsmParser/section.s b/test/MC/AsmParser/section.s index 5abacc7..0c3828d 100644 --- a/test/MC/AsmParser/section.s +++ b/test/MC/AsmParser/section.s @@ -1,5 +1,5 @@ # RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s -# RUN: elf-dump --dump-section-data < %t | FileCheck %s +# RUN: llvm-readobj -s -sd < %t | FileCheck %s .section test1 .byte 1 .section test2 @@ -45,63 +45,85 @@ .previous .byte 1 .previous -# CHECK: (('sh_name', 0x00000044) # 'test1' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000034) -# CHECK-NEXT: ('sh_size', 0x00000007) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '01010101 010101') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x0000003e) # 'test2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x0000003b) -# CHECK-NEXT: ('sh_size', 0x00000006) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '02020202 0202') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x00000038) # 'test3' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000041) -# CHECK-NEXT: ('sh_size', 0x00000005) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '03030303 03') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x00000032) # 'test4' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000046) -# CHECK-NEXT: ('sh_size', 0x00000003) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '040404') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x0000002c) # 'test5' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000049) -# CHECK-NEXT: ('sh_size', 0x00000001) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '05') -# CHECK-NEXT: ), + +# CHECK: Sections [ +# CHECK: Section { +# CHECK: Name: test1 (68) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x34 +# CHECK-NEXT: Size: 7 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 01010101 010101 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test2 (62) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x3B +# CHECK-NEXT: Size: 6 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 02020202 0202 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test3 (56) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x41 +# CHECK-NEXT: Size: 5 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 03030303 03 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test4 (50) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x46 +# CHECK-NEXT: Size: 3 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 040404 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test5 (44) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x49 +# CHECK-NEXT: Size: 1 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 05 +# CHECK-NEXT: ) +# CHECK-NEXT: } diff --git a/test/MC/AsmParser/section_names.s b/test/MC/AsmParser/section_names.s index 332cdbe..3883e15 100644 --- a/test/MC/AsmParser/section_names.s +++ b/test/MC/AsmParser/section_names.s @@ -1,5 +1,5 @@ # RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s -# RUN: elf-dump --dump-section-data < %t | FileCheck %s +# RUN: llvm-readobj -s < %t | FileCheck %s .section .nobits .byte 1 .section .nobits2 @@ -30,33 +30,33 @@ .byte 1 .section .notefoo .byte 1 -# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.nobitsfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array' -# CHECK-NEXT: ('sh_type', 0x0000000e) -# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.init_arrayfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array' -# CHECK-NEXT: ('sh_type', 0x0000000f) -# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_arrayfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array' -# CHECK-NEXT: ('sh_type', 0x00000010) -# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_arrayfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.note' -# CHECK-NEXT: ('sh_type', 0x00000007) -# CHECK: (('sh_name', 0x00000{{...}}) # '.note2' -# CHECK-NEXT: ('sh_type', 0x00000007) -#CHECK: (('sh_name', 0x00000{{...}}) # '.notefoo' -# CHECK-NEXT: ('sh_type', 0x00000007) +# CHECK: Name: .nobits +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .nobits2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .nobitsfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .init_array +# CHECK-NEXT: Type: SHT_INIT_ARRAY +# CHECK: Name: .init_array2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .init_arrayfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .fini_array +# CHECK-NEXT: Type: SHT_FINI_ARRAY +# CHECK: Name: .fini_array2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .fini_arrayfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .preinit_array +# CHECK-NEXT: Type: SHT_PREINIT_ARRAY +# CHECK: Name: .preinit_array2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .preinit_arrayfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .note +# CHECK-NEXT: Type: SHT_NOTE +# CHECK: Name: .note2 +# CHECK-NEXT: Type: SHT_NOTE +# CHECK: Name: .notefoo +# CHECK-NEXT: Type: SHT_NOTE |