[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / llvm-readobj / elf-symbol-binding.test
blob9ca5142abae467b3bb6a16b7a327347b97f06783
1 # Show that llvm-readobj can print symbol bindings correctly for both LLVM and
2 # GNU styles, including for symbol bindings that are not recognised.
4 # RUN: yaml2obj %s > %t
5 # RUN: llvm-readobj --symbols --dyn-symbols %t | FileCheck %s --check-prefix=LLVM
6 # RUN: llvm-readelf --symbols --dyn-symbols %t | FileCheck %s --check-prefix=GNU
8 # LLVM: Name:    local
9 # LLVM: Binding: Local
10 # LLVM: Name:    global
11 # LLVM: Binding: Global
12 # LLVM: Name:    weak
13 # LLVM: Binding: Weak
14 # LLVM: Name:    unknown
15 # LLVM: Binding: 0x3
16 # LLVM: Name:    unique
17 # LLVM: Binding: Unique (0xA)
18 # LLVM: Name:    os
19 # LLVM: Binding: 0xB
20 # LLVM: Name:    proc
21 # LLVM: Binding: 0xF
23 # GNU:      3      {{.*}} unknown
24 # GNU-NEXT: UNIQUE {{.*}} unique
25 # GNU-NEXT: b      {{.*}} os
26 # GNU-NEXT: f      {{.*}} proc
27 # GNU:      LOCAL  {{.*}} local
28 # GNU-NEXT: GLOBAL {{.*}} global
29 # GNU-NEXT: WEAK   {{.*}} weak
31 # yaml2obj doesn't have a way of specifying static symbols with custom bindings,
32 # so use a custom dynamic symbol table section instead.
33 --- !ELF
34 FileHeader:
35   Class:   ELFCLASS32
36   Data:    ELFDATA2LSB
37   Type:    ET_REL
38   Machine: EM_386
39 Sections:
40   - Name: .dynstr
41     Type: SHT_STRTAB
42     #\0unknown\0unique\0os\0proc\0
43     Content: "00756e6b6e6f776e00756e69717565006f730070726f6300"
44   - Name: .dynsym
45     Type: SHT_DYNSYM
46     Link: .dynstr
47     EntSize: 16
48     # Null symbol
49     # Symbol with st_name = 1, binding = 0x3
50     # Symbol with st_name = 9, binding = 0xa
51     # Symbol with st_name = 16, binding = 0xb
52     # Symbol with st_name = 19, binding = 0xf
53     Content: "0000000000000000000000000000000001000000000000000000000030000000090000000000000000000000a0000000100000000000000000000000b0000000130000000000000000000000f0000000"
54 Symbols:
55   - Name:    local
56   - Name:    global
57     Binding: STB_GLOBAL
58   - Name:    weak
59     Binding: STB_WEAK