1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/tools/yaml2obj/dynamic-symbols.yaml
Dave Lee e8a3b2bc92 Add ELF dynamic symbol support to yaml2obj/obj2yaml
Summary:
This change introduces a `DynamicSymbols` field to the ELF specific YAML
supported by `yaml2obj` and `obj2yaml`. This grouping of symbols provides a way
to represent ELF dynamic symbols. The `DynamicSymbols` structure is identical to
the existing `Symbols`.

Reviewers: compnerd, jakehehrlich, silvas

Reviewed By: silvas

Subscribers: silvas, jakehehrlich, llvm-commits

Differential Revision: https://reviews.llvm.org/D39582

llvm-svn: 318433
2017-11-16 18:10:15 +00:00

42 lines
979 B
YAML

# Ensures that implicitly added sections can be ordered within Sections.
# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj -sections %t | FileCheck %s --check-prefix=SECTION
# RUN: llvm-nm -dynamic %t | FileCheck %s --check-prefix=SYMBOL
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Machine: EM_X86_64
Sections:
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_WRITE ]
DynamicSymbols:
Global:
- Name: dynglobal
Type: STT_OBJECT
Section: .data
Weak:
- Name: dynweak
Type: STT_OBJECT
Section: .data
Local:
- Name: dynlocal
Type: STT_OBJECT
Section: .data
# SECTION: Name: .dynsym
# SECTION-NEXT: Type: SHT_DYNSYM
# SECTION-NEXT: Flags
# SECTION-NEXT: SHF_ALLOC
# SECTION: Name: .dynstr
# SECTION-NEXT: Type: SHT_STRTAB
# SECTION-NEXT: Flags
# SECTION-NEXT: SHF_ALLOC
# SYMBOL-DAG: D dynglobal
# SYMBOL-DAG: V dynweak
# SYMBOL-DAG: d dynlocal