1 ## Check how llvm-readobj/llvm-readelf tools dump the flags of SHT_GNU_verneed
4 # RUN: yaml2obj %s -o %t
5 # RUN: llvm-readobj -V %t | FileCheck %s --check-prefix=LLVM-VERDEF
6 # RUN: llvm-readelf -V %t | FileCheck %s --check-prefix=GNU-VERDEF
8 # LLVM-VERDEF: SHT_GNU_verneed {
9 # LLVM-VERDEF-NEXT: Dependency {
10 # LLVM-VERDEF-NEXT: Version: 1
11 # LLVM-VERDEF-NEXT: Count: 6
12 # LLVM-VERDEF-NEXT: FileName: dso.so.0
13 # LLVM-VERDEF-NEXT: Entries [
14 # LLVM-VERDEF-NEXT: Entry {
15 # LLVM-VERDEF-NEXT: Hash: 0
16 # LLVM-VERDEF-NEXT: Flags: Base (0x1)
17 # LLVM-VERDEF-NEXT: Index: 0
18 # LLVM-VERDEF-NEXT: Name: base
20 # LLVM-VERDEF-NEXT: Entry {
21 # LLVM-VERDEF-NEXT: Hash: 0
22 # LLVM-VERDEF-NEXT: Flags: Weak (0x2)
23 # LLVM-VERDEF-NEXT: Index: 0
24 # LLVM-VERDEF-NEXT: Name: weak
26 # LLVM-VERDEF-NEXT: Entry {
27 # LLVM-VERDEF-NEXT: Hash: 0
28 # LLVM-VERDEF-NEXT: Flags: Info (0x4)
29 # LLVM-VERDEF-NEXT: Index: 0
30 # LLVM-VERDEF-NEXT: Name: info
32 # LLVM-VERDEF-NEXT: Entry {
33 # LLVM-VERDEF-NEXT: Hash: 0
34 # LLVM-VERDEF-NEXT: Flags: 0x7
35 # LLVM-VERDEF-NEXT: Index: 0
36 # LLVM-VERDEF-NEXT: Name: all
38 # LLVM-VERDEF-NEXT: Entry {
39 # LLVM-VERDEF-NEXT: Hash: 0
40 # LLVM-VERDEF-NEXT: Flags: 0x8
41 # LLVM-VERDEF-NEXT: Index: 0
42 # LLVM-VERDEF-NEXT: Name: unknown
44 # LLVM-VERDEF-NEXT: Entry {
45 # LLVM-VERDEF-NEXT: Hash: 0
46 # LLVM-VERDEF-NEXT: Flags: 0xF
47 # LLVM-VERDEF-NEXT: Index: 0
48 # LLVM-VERDEF-NEXT: Name: all_and_unknown
54 # GNU-VERDEF: Version needs section '.gnu.version_r' contains 1 entries:
55 # GNU-VERDEF-NEXT: Addr: 0000000000000000 Offset: 0x000200 Link: 6 (.dynstr)
56 # GNU-VERDEF-NEXT: 0x0000: Version: 1 File: dso.so.0 Cnt: 6
57 # GNU-VERDEF-NEXT: 0x0010: Name: base Flags: BASE Version: 0
58 # GNU-VERDEF-NEXT: 0x0020: Name: weak Flags: WEAK Version: 0
59 # GNU-VERDEF-NEXT: 0x0030: Name: info Flags: INFO Version: 0
60 # GNU-VERDEF-NEXT: 0x0040: Name: all Flags: BASE | WEAK | INFO Version: 0
61 # GNU-VERDEF-NEXT: 0x0050: Name: unknown Flags: <unknown> Version: 0
62 # GNU-VERDEF-NEXT: 0x0060: Name: all_and_unknown Flags: BASE | WEAK | INFO | <unknown> Version: 0
70 Entry: 0x0000000000201000
72 - Name: .gnu.version_r
75 Info: 0x0000000000000001
100 - Name: all_and_unknown
104 ## Needed to trigger .dynstr creation, which is required by .gnu.version_r