1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/MC/AsmParser/section.s
Fangrui Song b2d3b0af04 [llvm-readobj] Change -long-option to --long-option in tests. NFC
We use both -long-option and --long-option in tests. Switch to --long-option for consistency.

In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf.

While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf).

llvm-svn: 359649
2019-05-01 05:27:20 +00:00

130 lines
2.9 KiB
ArmAsm

# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s
# RUN: llvm-readobj -S --sd < %t | FileCheck %s
.section test1
.byte 1
.section test2
.byte 2
.previous
.byte 1
.section test2
.byte 2
.previous
.byte 1
.section test1
.byte 1
.previous
.byte 1
.section test2
.byte 2
.pushsection test3
.byte 3
.pushsection test4
.byte 4
.pushsection test5
.byte 5
.popsection
.byte 4
.popsection
.byte 3
.popsection
.byte 2
.pushsection test3
.byte 3
.pushsection test4
.byte 4
.previous
.byte 3
.popsection
.byte 3
.previous
.byte 2
.section test1
.byte 1
.popsection
.byte 2
.previous
.byte 1
.previous
# CHECK: Sections [
# CHECK: Section {
# CHECK: Name: test1
# 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
# 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
# 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
# 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
# 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: }