summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-elfabi/binary-read-arch.test
diff options
context:
space:
mode:
authorArmando Montanez <amontanez@google.com>2019-01-03 18:32:36 +0000
committerArmando Montanez <amontanez@google.com>2019-01-03 18:32:36 +0000
commit31f0f659a8f46e6bb4c22caf30d6bd5e9b6329ec (patch)
tree4a014e36338a81d23eb741679e3972c89ff2aafa /llvm/test/tools/llvm-elfabi/binary-read-arch.test
parentca27a2b037f149654057927973a6221e71cdf242 (diff)
downloadbcm5719-llvm-31f0f659a8f46e6bb4c22caf30d6bd5e9b6329ec.tar.gz
bcm5719-llvm-31f0f659a8f46e6bb4c22caf30d6bd5e9b6329ec.zip
[elfabi] Introduce tool for ELF TextAPI
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
Diffstat (limited to 'llvm/test/tools/llvm-elfabi/binary-read-arch.test')
-rw-r--r--llvm/test/tools/llvm-elfabi/binary-read-arch.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-elfabi/binary-read-arch.test b/llvm/test/tools/llvm-elfabi/binary-read-arch.test
new file mode 100644
index 00000000000..ecb2fb81446
--- /dev/null
+++ b/llvm/test/tools/llvm-elfabi/binary-read-arch.test
@@ -0,0 +1,15 @@
+# RUN: yaml2obj %s > %t
+# RUN: llvm-elfabi %t --emit-tbe=- | FileCheck %s
+
+!ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_DYN
+ Machine: EM_X86_64
+
+# CHECK: --- !tapi-tbe
+# CHECK-NEXT: TbeVersion: {{[1-9]\d*\.(0|([1-9]\d*))}}
+# CHECK-NEXT: Arch: x86_64
+# CHECK-NEXT: Symbols: {}
+# CHECK-NEXT: ...
OpenPOWER on IntegriCloud