summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-01-16 15:29:26 +0000
committerHans Wennborg <hans@hanshq.net>2018-01-16 15:29:26 +0000
commitd0ae994498f1810c253c4acabe500ee74cdd3898 (patch)
tree78a6b0e095133fd14f1401123435d0678f95654a /test
parentdcef4a7cd5d513eaa65a00ccd1d1ef93c2e9a43f (diff)
Merging r321980:
------------------------------------------------------------------------ r321980 | phosek | 2018-01-07 18:23:10 -0800 (Sun, 07 Jan 2018) | 5 lines [llvm-readobj] Support -needed-libs option for Mach-O files This implements the -needed-libs option in Mach-O dumper. Differential Revision: https://reviews.llvm.org/D41527 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@322561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/tools/llvm-readobj/macho-needed-libs.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/tools/llvm-readobj/macho-needed-libs.test b/test/tools/llvm-readobj/macho-needed-libs.test
new file mode 100644
index 00000000000..22e6948e758
--- /dev/null
+++ b/test/tools/llvm-readobj/macho-needed-libs.test
@@ -0,0 +1,26 @@
+# RUN: yaml2obj %s -o %t.o
+# RUN: llvm-readobj -needed-libs %t.o | FileCheck %s
+
+# CHECK: NeededLibraries [
+# CHECK-NEXT: /usr/lib/libSystem.B.dylib
+# CHECK-NEXT: ]
+
+!mach-o
+FileHeader:
+ magic: 0xFEEDFACF
+ cputype: 0x01000007
+ cpusubtype: 0x00000003
+ filetype: 0x00000001
+ ncmds: 1
+ sizeofcmds: 56
+ flags: 0x00002000
+ reserved: 0x00000000
+LoadCommands:
+ - cmd: LC_LOAD_DYLIB
+ cmdsize: 56
+ dylib:
+ name: 24
+ timestamp: 2
+ current_version: 81985536
+ compatibility_version: 65536
+ PayloadString: /usr/lib/libSystem.B.dylib