summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-05-23 21:34:12 +0000
committerKevin Enderby <enderby@apple.com>2016-05-23 21:34:12 +0000
commit9873e2c46794407531737f5b6560488a02cb4a69 (patch)
tree1864308c9b24a927208a51903851f6bffcb0efcb /llvm/test/tools/llvm-objdump
parent76f3def58a1d7c242bee268ac1e21ddacaf2720f (diff)
downloadbcm5719-llvm-9873e2c46794407531737f5b6560488a02cb4a69.tar.gz
bcm5719-llvm-9873e2c46794407531737f5b6560488a02cb4a69.zip
Add the printing the Mach-O (__LLVM,__bundle) xar archive file section "verbosely"
to llvm-objdump. This section is created with -fembed-bitcode option. This requires the use of libxar and the Cmake and lit support were crafted by Chris Bieneman! rdar://26202242 llvm-svn: 270491
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rwxr-xr-xllvm/test/tools/llvm-objdump/Inputs/LLVM-bundle.macho-x86_64bin0 -> 16624 bytes
-rw-r--r--llvm/test/tools/llvm-objdump/macho-LLVM-bundle.test60
2 files changed, 60 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/Inputs/LLVM-bundle.macho-x86_64 b/llvm/test/tools/llvm-objdump/Inputs/LLVM-bundle.macho-x86_64
new file mode 100755
index 00000000000..8a7e4ef39e1
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/Inputs/LLVM-bundle.macho-x86_64
Binary files differ
diff --git a/llvm/test/tools/llvm-objdump/macho-LLVM-bundle.test b/llvm/test/tools/llvm-objdump/macho-LLVM-bundle.test
new file mode 100644
index 00000000000..b7134307257
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/macho-LLVM-bundle.test
@@ -0,0 +1,60 @@
+# REQUIRES: xar
+# RUN: llvm-objdump -macho -archive-headers -section __LLVM,__bundle %p/Inputs/LLVM-bundle.macho-x86_64 | FileCheck %s
+
+# CHECK: For (__LLVM,__bundle) section: xar header
+# CHECK: magic XAR_HEADER_MAGIC
+# CHECK: size 28
+# CHECK: version 1
+# CHECK: toc_length_compressed 542
+# CHECK: toc_length_uncompressed 1250
+# CHECK: cksum_alg XAR_CKSUM_SHA1
+# CHECK: For (__LLVM,__bundle) section: xar archive files:
+# CHECK: 1664 1
+# CHECK: For (__LLVM,__bundle) section: xar table of contents:
+# CHECK: <?xml version="1.0" encoding="UTF-8"?>
+# CHECK: <xar>
+# CHECK: <subdoc subdoc_name="Ld">
+# CHECK: <version>1.0</version>
+# CHECK: <architecture>x86_64</architecture>
+# CHECK: <platform>MacOSX</platform>
+# CHECK: <sdkversion>10.11.0</sdkversion>
+# CHECK: <dylibs>
+# CHECK: <lib>libSystem.dylib</lib>
+# CHECK: </dylibs>
+# CHECK: <link-options>
+# CHECK: <option>-execute</option>
+# CHECK: <option>-macosx_version_min</option>
+# CHECK: <option>10.11.0</option>
+# CHECK: <option>-e</option>
+# CHECK: <option>_main</option>
+# CHECK: <option>-executable_path</option>
+# CHECK: <option>hello</option>
+# CHECK: </link-options>
+# CHECK: </subdoc>
+# CHECK: <toc>
+# CHECK: <checksum style="sha1">
+# CHECK: <size>20</size>
+# CHECK: <offset>0</offset>
+# CHECK: </checksum>
+# CHECK: <creation-time>2016-05-23T20:49:10</creation-time>
+# CHECK: <file id="1">
+# CHECK: <name>1</name>
+# CHECK: <type>file</type>
+# CHECK: <data>
+# CHECK: <archived-checksum style="sha1">a319940ff5f5248ca8b44cf7b4b65e7dd49a47ab</archived-checksum>
+# CHECK: <extracted-checksum style="sha1">a319940ff5f5248ca8b44cf7b4b65e7dd49a47ab</extracted-checksum>
+# CHECK: <size>1664</size>
+# CHECK: <offset>20</offset>
+# CHECK: <encoding style="application/octet-stream"/>
+# CHECK: <length>1664</length>
+# CHECK: </data>
+# CHECK: <file-type>Bitcode</file-type>
+# CHECK: <clang>
+# CHECK: <cmd>-triple</cmd>
+# CHECK: <cmd>x86_64-apple-macosx10.11.0</cmd>
+# CHECK: <cmd>-emit-obj</cmd>
+# CHECK: <cmd>-disable-llvm-optzns</cmd>
+# CHECK: </clang>
+# CHECK: </file>
+# CHECK: </toc>
+# CHECK: </xar>
OpenPOWER on IntegriCloud