File: verdef-section.yaml

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (83 lines) | stat: -rw-r--r-- 2,588 bytes parent folder | download | duplicates (15)
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
77
78
79
80
81
82
83
## Check how we dump SHT_GNU_verdef sections.
## Check we don't dump the `Info` field when its value is equal
## to the number of version definitions.

# RUN: yaml2obj %s -o %t
# RUN: obj2yaml %t | FileCheck %s

# CHECK:       - Name:         .gnu.version_d
# CHECK-NEXT:    Type:         SHT_GNU_verdef
# CHECK-NEXT:    Flags:        [ SHF_ALLOC ]
# CHECK-NEXT:    Address:      0x230
# CHECK-NEXT:    Link:         .dynstr
# CHECK-NEXT:    AddressAlign: 0x4
# INFO-NEXT:     Info:         0x4
# CHECK-NEXT:    Entries:
# CHECK-NEXT:      - Names:
# CHECK-NEXT:          - VERSION_0
# CHECK-NEXT:      - Flags:      2
# CHECK-NEXT:        VersionNdx: 2
# CHECK-NEXT:        Hash:       108387921
# CHECK-NEXT:        Names:
# CHECK-NEXT:          - VERSION_1
# CHECK-NEXT:      - Flags:      3
# CHECK-NEXT:        VersionNdx: 3
# CHECK-NEXT:        Hash:       108387922
# CHECK-NEXT:        Names:
# CHECK-NEXT:          - VERSION_2
# CHECK-NEXT:          - VERSION_3
# CHECK-NEXT:          - VERSION_4
# CHECK-NEXT:  - Name:

--- !ELF
FileHeader:
  Class: ELFCLASS64
  Data:  ELFDATA2LSB
  Type:  ET_DYN
Sections:
  - Name:            .gnu.version_d
    Type:            SHT_GNU_verdef
    Flags:           [ SHF_ALLOC ]
    Address:         0x230
    AddressAlign:    0x4
    Info:            [[INFO=<none>]]
    Entries:
## An entry that has all fields explicitly set to their default values.
## Used to check that we don't dump them.
      - Version:    [[VERSION=1]]
        Flags:      0
        VersionNdx: 0
        Hash:       0
        Names:
          - VERSION_0
## An entry with arbitrary values.
      - Flags:      2
        VersionNdx: 2
        Hash:       108387921
        Names:
          - VERSION_1
## Another entry with arbitrary values and version predecessors.
      - Flags:      3
        VersionNdx: 3
        Hash:       108387922
        Names:
          - VERSION_2
          - VERSION_3
          - VERSION_4
## Needed to emit the .dynstr section.
DynamicSymbols: []

## Check we dump the `Info` field when its value is not equal
## to the number of version definitions.

# RUN: yaml2obj %s -DINFO=0x4 -o %t.info
# RUN: obj2yaml %t.info | FileCheck %s --check-prefixes=CHECK,INFO

## Document that we are not able to dump a version definition which
## has a version revision (vd_version) that is not equal to 1.

# RUN: yaml2obj %s -DVERSION=2 -o %t.version
# RUN: not obj2yaml %t.version 2>&1 | \
# RUN:   FileCheck %s -DFILE=%t.version --check-prefix=VERSION-ERR

# VERSION-ERR: Error reading file: [[FILE]]: invalid SHT_GNU_verdef section version: 2