1## This is a test case for --section-symbols, --section-relocations
2## and --section-data command line options and their aliases.
3
4# RUN: llvm-readobj -S --st --sr --sd %p/Inputs/trivial.obj.coff-i386 | FileCheck %s
5# RUN: llvm-readobj -S --section-symbols --section-relocations --section-data \
6# RUN:  %p/Inputs/trivial.obj.coff-i386 | FileCheck %s
7
8# CHECK:      Sections [
9# CHECK-NEXT:   Section {
10# CHECK-NEXT:     Number: 1
11# CHECK-NEXT:     Name: .text (2E 74 65 78 74 00 00 00)
12# CHECK-NEXT:     VirtualSize: 0x0
13# CHECK-NEXT:     VirtualAddress: 0x0
14# CHECK-NEXT:     RawDataSize: 22
15# CHECK-NEXT:     PointerToRawData: 0x64
16# CHECK-NEXT:     PointerToRelocations: 0x7A
17# CHECK-NEXT:     PointerToLineNumbers: 0x0
18# CHECK-NEXT:     RelocationCount: 3
19# CHECK-NEXT:     LineNumberCount: 0
20# CHECK-NEXT:     Characteristics [ (0x60500020)
21# CHECK-NEXT:       IMAGE_SCN_ALIGN_16BYTES (0x500000)
22# CHECK-NEXT:       IMAGE_SCN_CNT_CODE (0x20)
23# CHECK-NEXT:       IMAGE_SCN_MEM_EXECUTE (0x20000000)
24# CHECK-NEXT:       IMAGE_SCN_MEM_READ (0x40000000)
25# CHECK-NEXT:     ]
26# CHECK-NEXT:     Relocations [
27# CHECK-NEXT:       0x4 IMAGE_REL_I386_DIR32 .data
28# CHECK-NEXT:       0x9 IMAGE_REL_I386_REL32 _puts
29# CHECK-NEXT:       0xE IMAGE_REL_I386_REL32 _SomeOtherFunction
30# CHECK-NEXT:     ]
31# CHECK-NEXT:     Symbols [
32# CHECK-NEXT:       Symbol {
33# CHECK-NEXT:         Name: .text
34# CHECK-NEXT:         Value: 0
35# CHECK-NEXT:         Section: .text (1)
36# CHECK-NEXT:         BaseType: Null (0x0)
37# CHECK-NEXT:         ComplexType: Null (0x0)
38# CHECK-NEXT:         StorageClass: Static (0x3)
39# CHECK-NEXT:         AuxSymbolCount: 1
40# CHECK-NEXT:         AuxSectionDef {
41# CHECK-NEXT:           Length: 22
42# CHECK-NEXT:           RelocationCount: 3
43# CHECK-NEXT:           LineNumberCount: 0
44# CHECK-NEXT:           Checksum: 0x0
45# CHECK-NEXT:           Number: 1
46# CHECK-NEXT:           Selection: 0x0
47# CHECK-NEXT:         }
48# CHECK-NEXT:       }
49# CHECK-NEXT:       Symbol {
50# CHECK-NEXT:         Name: _main
51# CHECK-NEXT:         Value: 0
52# CHECK-NEXT:         Section: .text (1)
53# CHECK-NEXT:         BaseType: Null (0x0)
54# CHECK-NEXT:         ComplexType: Function (0x2)
55# CHECK-NEXT:         StorageClass: External (0x2)
56# CHECK-NEXT:         AuxSymbolCount: 0
57# CHECK-NEXT:       }
58# CHECK-NEXT:     ]
59# CHECK-NEXT:     SectionData (
60# CHECK-NEXT:       0000: 50C70424 00000000 E8000000 00E80000  |P..$............|
61# CHECK-NEXT:       0010: 000031C0 5AC3                        |..1.Z.|
62# CHECK-NEXT:     )
63# CHECK-NEXT:   }
64