mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
6332c89a96
Follow up for D53051 This patch introduces the tool associated with the ELF implementation of TextAPI (previously llvm-tapi, renamed for better distinction). This tool will house a number of features related to enalysis and manipulation of shared object's exposed interfaces. The first major feature for this tool is support for producing binary stubs that are useful for compile-time linking of shared objects. This patch introduces beginnings of support for reading binary ELF objects to work towards that goal. Added: - elfabi tool. - support for reading architecture from a binary ELF file into an ELFStub. - Support for writing .tbe files. Differential Revision: https://reviews.llvm.org/D55352 llvm-svn: 350341
26 lines
741 B
Plaintext
26 lines
741 B
Plaintext
# RUN: llvm-elfabi %s --emit-tbe=- | FileCheck %s
|
|
|
|
--- !tapi-tbe
|
|
SoName: somelib.so
|
|
TbeVersion: 1.0
|
|
Arch: x86_64
|
|
Symbols:
|
|
foo: { Type: Func }
|
|
bar: { Type: Object, Size: 42 }
|
|
baz: { Type: Object, Size: 8 }
|
|
not: { Type: Object, Undefined: true, Size: 128 }
|
|
nor: { Type: Func, Undefined: true }
|
|
...
|
|
|
|
# CHECK: --- !tapi-tbe
|
|
# CHECK-NEXT: TbeVersion: {{[1-9]\d*\.(0|([1-9]\d*))}}
|
|
# CHECK-NEXT: SoName: somelib.so
|
|
# CHECK-NEXT: Arch: x86_64
|
|
# CHECK-NEXT: Symbols:
|
|
# CHECK-NEXT: bar: { Type: Object, Size: 42 }
|
|
# CHECK-NEXT: baz: { Type: Object, Size: 8 }
|
|
# CHECK-NEXT: foo: { Type: Func }
|
|
# CHECK-NEXT: nor: { Type: Func, Undefined: true }
|
|
# CHECK-NEXT: not: { Type: Object, Size: 128, Undefined: true }
|
|
# CHECK-NEXT: ...
|