1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Puyan Lotfi e0c741cd7e [llvm-ifs][IFS] llvm Interface Stubs merging + object file generation tool.
This tool merges interface stub files to produce a merged interface stub file
or a stub library. Currently it for stub library generation it can produce an
ELF .so stub file, or a TBD file (experimental). It will be used by the clang
-emit-interface-stubs compilation pipeline to merge and assemble the per-CU
stub files into a stub library.

The new IFS format is as follows:

--- !experimental-ifs-v1
IfsVersion:      1.0
Triple:          <llvm triple>
ObjectFileFormat: <ELF | TBD>
Symbols:
  _ZSymbolName: { Type: <type>, etc... }
...

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

llvm-svn: 370499
2019-08-30 18:26:05 +00:00

29 lines
966 B
Plaintext

# RUN: llvm-ifs -action write-ifs -o - %s | \
# RUN: FileCheck %s --check-prefixes=CHECK-IFS
# RUN: llvm-ifs -action write-bin -o - %s | \
# RUN: llvm-readelf --all | FileCheck %s --check-prefixes=CHECK-ELF
# CHECK-IFS: --- !experimental-ifs-v1
# CHECK-IFS-NEXT: IfsVersion: 1.0
# CHECK-IFS-NEXT: Triple: x86_64-unknown-linux-gnu
# CHECK-IFS-NEXT: ObjectFileFormat: ELF
# CHECK-IFS-NEXT: Symbols:
# CHECK-IFS-NEXT: b: { Type: Object, Size: 4 }
# CHECK-IFS-NEXT: ...
# CHECK-ELF: ELF Header:
# CHECK-ELF: Class: ELF64
# CHECK-ELF: Data: 2's complement, little endian
# CHECK-ELF: Type: DYN (Shared object file)
# CHECK-ELF-NOT: FUNC GLOBAL DEFAULT 1 a
# CHECK-ELF: OBJECT GLOBAL DEFAULT 1 b
--- !experimental-ifs-v1
IfsVersion: 1.0
Triple: x86_64-unknown-linux-gnu
ObjectFileFormat: ELF
Symbols:
b: { Type: Object, Size: 4 }
...