1 # RUN: yaml2obj %s > %t
2 # RUN: obj2yaml %t | FileCheck %s
4 ## Test checks that we are able to handle symbols with special/reserved indices.
7 # CHECK-NEXT: - Name: absolute
8 # CHECK-NEXT: Index: SHN_ABS
9 # CHECK-NEXT: Binding: STB_GLOBAL
10 # CHECK-NEXT: Value: 0x0000000000001234
11 # CHECK-NEXT: - Name: common
12 # CHECK-NEXT: Index: SHN_COMMON
13 # CHECK-NEXT: Binding: STB_GLOBAL
14 # CHECK-NEXT: - Name: valid_index
15 # CHECK-NEXT: Section: .text
16 # CHECK-NEXT: Binding: STB_GLOBAL
17 # CHECK-NEXT: - Name: processor_specific_index
18 # CHECK-NEXT: Index: SHN_HEXAGON_SCOMMON_1
19 # CHECK-NEXT: Binding: STB_GLOBAL
20 # CHECK-NEXT: - Name: unknown_index
21 # CHECK-NEXT: Index: 0x0000FFFE
22 # CHECK-NEXT: Binding: STB_GLOBAL
44 - Name: processor_specific_index
45 Index: SHN_HEXAGON_SCOMMON_1
51 ## shn_xindex.o contains a symbol with st_shndx == SHN_XINDEX.
52 ## We do not support it at this moment.
53 # RUN: not obj2yaml %S/Inputs/shn_xindex.o 2>&1 | FileCheck %s --check-prefix=ERR
54 # ERR: Error reading file: {{.*}}shn_xindex.o: SHN_XINDEX symbols are not supported