xref: /llvm-project/llvm/test/tools/yaml2obj/ELF/symbol-value.yaml (revision 8c2cf89834c3496be343525b9f9c6aecc9182117)
1## Check we can set different values for symbols.
2
3# RUN: yaml2obj %s -o %t
4# RUN: llvm-readelf --symbols %t | FileCheck %s
5
6--- !ELF
7FileHeader:
8  Class: ELFCLASS64
9  Data:  ELFDATA2LSB
10  Type:  ET_REL
11Symbols:
12## No "Value" key was set. Check the behaviour is the
13## same as if it was set to 0.
14  - Name:  aaa
15# CHECK:    Num: Value            {{.*}} Name
16# CHECK:      1: 0000000000000000 {{.*}} aaa
17## The "Value" key is explicitly set to 0x0.
18  - Name:  bbb
19    Value: 0x0
20## Check we can use the "=<none>" syntax.
21# CHECK-NEXT: 2: 0000000000000000 {{.*}} bbb
22  - Name:  ccc
23    Value: [[EVAL=<none>]]
24# CHECK-NEXT: 3: 0000000000000000 {{.*}} ccc
25## The "Value" key is explicitly set to an arbitrary value.
26## Here we use UINT64_MAX to check this boundary case.
27  - Name:  ddd
28    Value: 0xffffffffffffffff
29# CHECK-NEXT: 4: ffffffffffffffff {{.*}} ddd
30## The same as the previous case, but using decimal values.
31  - Name:  eee
32    Value: 18446744073709551615
33# CHECK-NEXT: 5: ffffffffffffffff {{.*}} eee
34