1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/tools/yaml2obj/ELF/local-symbols.yaml
Fangrui Song 6b2ff4d5ae [test] yaml2obj -docnum => --docnum=
Make usage more consistent, and make it possible to enable LongOptionsUseDoubleDash.
2020-02-04 10:33:21 -08:00

37 lines
903 B
YAML

## Check we correctly set the sh_info field of .symtab section.
## A symbol table section's sh_info section header member holds
## the symbol table index for the first non-local symbol.
# RUN: yaml2obj --docnum=1 %s -o %t
# RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix=ONE
# ONE: Name: .symtab
# ONE: Info: 2
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Machine: EM_X86_64
Symbols:
- Name: local
- Name: global
Binding: STB_GLOBAL
# RUN: yaml2obj --docnum=2 %s -o %t
# RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix=TWO
# TWO: Name: .symtab
# TWO: Info: 3
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Machine: EM_X86_64
Symbols:
- Name: local1
- Name: local2
- Name: global
Binding: STB_GLOBAL