readelf-s-alias.test
1.51 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
# In llvm-readobj, -s is an alias for --sections.
RUN: llvm-readobj -S %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix SEC
RUN: llvm-readobj --sections %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix SEC
# In llvm-readelf, -s is an alias for --symbols.
RUN: llvm-readelf -s %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix SYM
RUN: llvm-readelf --symbols %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix SYM
SEC: Sections [
SEC-NEXT: Section {
SEC-NEXT: Index: 0
SEC-NEXT: Name: (0)
SEC-NEXT: Type: SHT_NULL (0x0)
SEC-NEXT: Flags [ (0x0)
SEC-NEXT: ]
SEC-NEXT: Address: 0x0
SEC-NEXT: Offset: 0x0
SEC-NEXT: Size: 0
SEC-NEXT: Link: 0
SEC-NEXT: Info: 0
SEC-NEXT: AddressAlignment: 0
SEC-NEXT: EntrySize: 0
SEC-NEXT: }
SEC-NEXT: Section {
SEC-NEXT: Index: 1
SEC-NEXT: Name: .text (5)
SEC-NEXT: Type: SHT_PROGBITS (0x1)
SEC-NEXT: Flags [ (0x6)
SEC-NEXT: SHF_ALLOC (0x2)
SEC-NEXT: SHF_EXECINSTR (0x4)
SEC-NEXT: ]
SEC-NEXT: Address: 0x0
SEC-NEXT: Offset: 0x40
SEC-NEXT: Size: 42
SEC-NEXT: Link: 0
SEC-NEXT: Info: 0
SEC-NEXT: AddressAlignment: 16
SEC-NEXT: EntrySize: 0
SEC-NEXT: }
SYM: Symbol table '.symtab' contains {{.*}} entries:
SYM-NEXT: Num: Value Size Type Bind Vis Ndx Name
SYM-NEXT: 0: {{.*}} NOTYPE {{.*}} UND
SYM-NEXT: 1: {{.*}} FILE {{.*}} trivial.ll
SYM-NEXT: 2: {{.*}} OBJECT {{.*}} .L.str