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/symbols-binding-order.yaml
Fangrui Song 053d07b664 [yaml2obj][test] Move tests to binary format specific subdirectories
Create COFF/, ELF/, and Minidump and move tests there.

Also

* Rename `*.test` to `*.yaml`
* For yaml2obj RUN lines, use `-o %t` instead of `> %t` for consistency.
  We still have tests that check stdout is the default output, e.g.
  multi-doc.test
* Update tests to consistently use `##` for comments.
  `#` is for RUN and CHECK lines.
* Merge symboless-relocation.yaml and invalid-symboless-relocation.yaml to ELF/relocation-implicit-symbol-index.test

Reviewed By: grimar, jhenderson

Differential Revision: https://reviews.llvm.org/D70264
2019-11-18 09:06:14 -08:00

35 lines
1.3 KiB
YAML

## Check we allow placing local symbols after global to
## .symtab and .dynsym. This allows us to produce broken outputs.
# RUN: yaml2obj %s -o %t
# RUN: llvm-readelf --symbols %t | FileCheck %s
# CHECK: Symbol table '.dynsym' contains 3 entries:
# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name
# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
# CHECK-NEXT: 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND dynamicGlobal
# CHECK-NEXT: 2: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND dynamicLocal
# CHECK: Symbol table '.symtab' contains 3 entries:
# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name
# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
# CHECK-NEXT: 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND staticGlobal
# CHECK-NEXT: 2: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND staticLocal
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Symbols:
- Name: staticGlobal
Binding: STB_GLOBAL
- Name: staticLocal
Binding: STB_LOCAL
DynamicSymbols:
- Name: dynamicGlobal
Binding: STB_GLOBAL
- Name: dynamicLocal
Binding: STB_LOCAL