xref: /llvm-project/llvm/test/tools/yaml2obj/ELF/symbol-size.yaml (revision 8c2cf89834c3496be343525b9f9c6aecc9182117)
1## Check we can set different sizes 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 "Size" key was set. Check the behaviour is the
13## same as if it was set to 0.
14  - Name:  aaa
15# CHECK:    Num: Value Size {{.*}} Name
16# CHECK:      1: [[#]] 0    {{.*}} aaa
17## The "Size" key is explicitly set to 0x0.
18  - Name:  bbb
19    Size:  0x0
20## Check we can use the "=<none>" syntax.
21# CHECK-NEXT: 2: [[#]] 0    {{.*}} bbb
22  - Name:  ccc
23    Size:  [[ESIZE=<none>]]
24# CHECK-NEXT: 3: [[#]] 0    {{.*}} ccc
25## "Size" is explicitly set to an arbitrary value.
26## Here we use UINT64_MAX to check this boundary case.
27  - Name:  ddd
28    Size:  0xffffffffffffffff
29# CHECK-NEXT: 4: [[#]] -1   {{.*}} ddd
30## The same as the previous case, but using decimal values.
31  - Name:  eee
32    Size:  18446744073709551615
33# CHECK-NEXT: 5: [[#]] -1   {{.*}} eee
34