sections.test
2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
## Check how we print sections.
# RUN: llvm-readobj --sections %p/Inputs/trivial.obj.elf-i386 \
# RUN: | FileCheck %s --check-prefix ELF
# RUN: llvm-readobj --sections %p/Inputs/trivial.obj.elf-mipsel \
# RUN: | FileCheck %s --check-prefix ELF-MIPSEL
## Check flag aliases produce identical output.
# RUN: llvm-readobj --sections %p/Inputs/trivial.obj.elf-i386 > %t.sections
# RUN: llvm-readobj -S %p/Inputs/trivial.obj.elf-i386 > %t.uppers
# RUN: cmp %t.sections %t.uppers
# RUN: llvm-readobj -S %p/Inputs/trivial.obj.elf-i386 > %t.lowers
# RUN: cmp %t.sections %t.lowers
# ELF: Sections [
# ELF-NEXT: Section {
# ELF-NEXT: Index: 0
# ELF-NEXT: Name: (0)
# ELF-NEXT: Type: SHT_NULL (0x0)
# ELF-NEXT: Flags [ (0x0)
# ELF-NEXT: ]
# ELF-NEXT: Address: 0x0
# ELF-NEXT: Offset: 0x0
# ELF-NEXT: Size: 0
# ELF-NEXT: Link: 0
# ELF-NEXT: Info: 0
# ELF-NEXT: AddressAlignment: 0
# ELF-NEXT: EntrySize: 0
# ELF-NEXT: }
# ELF-NEXT: Section {
# ELF-NEXT: Index: 1
# ELF-NEXT: Name: .text (5)
# ELF-NEXT: Type: SHT_PROGBITS (0x1)
# ELF-NEXT: Flags [ (0x6)
# ELF-NEXT: SHF_ALLOC (0x2)
# ELF-NEXT: SHF_EXECINSTR (0x4)
# ELF-NEXT: ]
# ELF-NEXT: Address: 0x0
# ELF-NEXT: Offset: 0x40
# ELF-NEXT: Size: 42
# ELF-NEXT: Link: 0
# ELF-NEXT: Info: 0
# ELF-NEXT: AddressAlignment: 16
# ELF-NEXT: EntrySize: 0
# ELF-NEXT: }
# ELF-MIPSEL: Section {
# ELF-MIPSEL: Index: 4
# ELF-MIPSEL-NEXT: Name: .reginfo (27)
# ELF-MIPSEL-NEXT: Type: SHT_MIPS_REGINFO (0x70000006)
# ELF-MIPSEL-NEXT: Flags [ (0x2)
# ELF-MIPSEL-NEXT: SHF_ALLOC (0x2)
# ELF-MIPSEL-NEXT: ]
# ELF-MIPSEL-NEXT: Address: 0x0
# ELF-MIPSEL-NEXT: Offset: 0x34
# ELF-MIPSEL-NEXT: Size: 24
# ELF-MIPSEL-NEXT: Link: 0
# ELF-MIPSEL-NEXT: Info: 0
# ELF-MIPSEL-NEXT: AddressAlignment: 1
# ELF-MIPSEL-NEXT: EntrySize: 0
# ELF-MIPSEL-NEXT: }
# ELF-MIPSEL-NEXT: Section {
# ELF-MIPSEL-NEXT: Index: 5
# ELF-MIPSEL-NEXT: Name: .MIPS.abiflags (12)
# ELF-MIPSEL-NEXT: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# ELF-MIPSEL-NEXT: Flags [ (0x2)
# ELF-MIPSEL-NEXT: SHF_ALLOC (0x2)
# ELF-MIPSEL-NEXT: ]
# ELF-MIPSEL-NEXT: Address: 0x0
# ELF-MIPSEL-NEXT: Offset: 0x50
# ELF-MIPSEL-NEXT: Size: 24
# ELF-MIPSEL-NEXT: Link: 0
# ELF-MIPSEL-NEXT: Info: 0
# ELF-MIPSEL-NEXT: AddressAlignment: 8
# ELF-MIPSEL-NEXT: EntrySize: 0
# ELF-MIPSEL-NEXT: }