summaryrefslogtreecommitdiff
path: root/test/mach-o/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'test/mach-o/Inputs')
-rwxr-xr-xtest/mach-o/Inputs/DependencyDump.py30
-rw-r--r--test/mach-o/Inputs/bar.yaml18
-rw-r--r--test/mach-o/Inputs/exported_symbols_list.exp6
-rw-r--r--test/mach-o/Inputs/full.filelist3
-rwxr-xr-xtest/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylibbin0 -> 20628 bytes
-rw-r--r--test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.abin0 -> 556 bytes
-rw-r--r--test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.obin0 -> 404 bytes
-rw-r--r--test/mach-o/Inputs/libSystem.yaml13
-rw-r--r--test/mach-o/Inputs/libbar.abin0 -> 824 bytes
-rw-r--r--test/mach-o/Inputs/libfoo.abin0 -> 1320 bytes
-rw-r--r--test/mach-o/Inputs/order_file-basic.order11
-rw-r--r--test/mach-o/Inputs/partial.filelist3
-rw-r--r--test/mach-o/Inputs/use-dylib-install-names.yaml28
13 files changed, 112 insertions, 0 deletions
diff --git a/test/mach-o/Inputs/DependencyDump.py b/test/mach-o/Inputs/DependencyDump.py
new file mode 100755
index 0000000000000..0f4d49d6fb9a8
--- /dev/null
+++ b/test/mach-o/Inputs/DependencyDump.py
@@ -0,0 +1,30 @@
+# -*- Python -*-
+
+
+#
+# Dump out Xcode binary dependency file.
+#
+
+import sys
+
+f = open(sys.argv[1], "rb")
+byte = f.read(1)
+while byte != b'':
+ if byte == b'\000':
+ sys.stdout.write("linker-vers: ")
+ elif byte == b'\020':
+ sys.stdout.write("input-file: ")
+ elif byte == b'\021':
+ sys.stdout.write("not-found: ")
+ elif byte == b'\100':
+ sys.stdout.write("output-file: ")
+ byte = f.read(1)
+ while byte != b'\000':
+ if byte != b'\012':
+ sys.stdout.write(byte.decode("ascii"))
+ byte = f.read(1)
+ sys.stdout.write("\n")
+ byte = f.read(1)
+
+f.close()
+
diff --git a/test/mach-o/Inputs/bar.yaml b/test/mach-o/Inputs/bar.yaml
new file mode 100644
index 0000000000000..5605e67e7c352
--- /dev/null
+++ b/test/mach-o/Inputs/bar.yaml
@@ -0,0 +1,18 @@
+
+--- !mach-o
+arch: x86_64
+file-type: MH_OBJECT
+flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
+sections:
+ - segment: __TEXT
+ section: __text
+ type: S_REGULAR
+ attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
+ address: 0x0000000000000000
+ content: [ 0xC3 ]
+global-symbols:
+ - name: _bar
+ type: N_SECT
+ scope: [ N_EXT ]
+ sect: 1
+ value: 0x0000000000000000
diff --git a/test/mach-o/Inputs/exported_symbols_list.exp b/test/mach-o/Inputs/exported_symbols_list.exp
new file mode 100644
index 0000000000000..ff66533424721
--- /dev/null
+++ b/test/mach-o/Inputs/exported_symbols_list.exp
@@ -0,0 +1,6 @@
+#
+# For use with exported_symbols_list.yaml
+#
+_foo
+_b
+
diff --git a/test/mach-o/Inputs/full.filelist b/test/mach-o/Inputs/full.filelist
new file mode 100644
index 0000000000000..abf98b6333776
--- /dev/null
+++ b/test/mach-o/Inputs/full.filelist
@@ -0,0 +1,3 @@
+/foo/bar/a.o
+/foo/bar/b.o
+/foo/x.a
diff --git a/test/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylib b/test/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylib
new file mode 100755
index 0000000000000..71185fbdf7360
--- /dev/null
+++ b/test/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylib
Binary files differ
diff --git a/test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a b/test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a
new file mode 100644
index 0000000000000..b12062941f376
--- /dev/null
+++ b/test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a
Binary files differ
diff --git a/test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o b/test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o
new file mode 100644
index 0000000000000..f9a923d37db38
--- /dev/null
+++ b/test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o
Binary files differ
diff --git a/test/mach-o/Inputs/libSystem.yaml b/test/mach-o/Inputs/libSystem.yaml
new file mode 100644
index 0000000000000..2a7f46381dcc1
--- /dev/null
+++ b/test/mach-o/Inputs/libSystem.yaml
@@ -0,0 +1,13 @@
+#
+# For use by test cases that create dynamic output types which may needs stubs
+# and therefore will need a dylib definition of dyld_stub_binder.
+#
+
+---
+shared-library-atoms:
+ - name: dyld_stub_binder
+ load-name: /usr/lib/libSystem.B.dylib
+ type: code
+ size: 0
+
+...
diff --git a/test/mach-o/Inputs/libbar.a b/test/mach-o/Inputs/libbar.a
new file mode 100644
index 0000000000000..64cae6c749eee
--- /dev/null
+++ b/test/mach-o/Inputs/libbar.a
Binary files differ
diff --git a/test/mach-o/Inputs/libfoo.a b/test/mach-o/Inputs/libfoo.a
new file mode 100644
index 0000000000000..21194efbabf92
--- /dev/null
+++ b/test/mach-o/Inputs/libfoo.a
Binary files differ
diff --git a/test/mach-o/Inputs/order_file-basic.order b/test/mach-o/Inputs/order_file-basic.order
new file mode 100644
index 0000000000000..0ac90cb79da76
--- /dev/null
+++ b/test/mach-o/Inputs/order_file-basic.order
@@ -0,0 +1,11 @@
+
+# input file for order_file-basic.yaml
+
+_func2
+libfoo.a(foo.o):_foo # tests file specific ordering within archive
+i386:_func3 # wrong arch, so ignored
+armv7:_func3 # wrong arch, so ignored
+_func1
+_notfound # unknown symbol silently ignored
+_data3 # data symbols should be orderable
+
diff --git a/test/mach-o/Inputs/partial.filelist b/test/mach-o/Inputs/partial.filelist
new file mode 100644
index 0000000000000..281581bf00fc0
--- /dev/null
+++ b/test/mach-o/Inputs/partial.filelist
@@ -0,0 +1,3 @@
+bar/a.o
+bar/b.o
+x.a
diff --git a/test/mach-o/Inputs/use-dylib-install-names.yaml b/test/mach-o/Inputs/use-dylib-install-names.yaml
new file mode 100644
index 0000000000000..cec2559f2435e
--- /dev/null
+++ b/test/mach-o/Inputs/use-dylib-install-names.yaml
@@ -0,0 +1,28 @@
+--- !mach-o
+arch: x86_64
+file-type: MH_OBJECT
+flags: [ ]
+has-UUID: false
+OS: unknown
+sections:
+ - segment: __TEXT
+ section: __text
+ type: S_REGULAR
+ attributes: [ S_ATTR_PURE_INSTRUCTIONS ]
+ address: 0x0000000000000000
+ content: [ 0x55, 0x48, 0x89, 0xE5, 0xE8, 0x00, 0x00, 0x00,
+ 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00,
+ 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00,
+ 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xE9, 0x00,
+ 0x00, 0x00, 0x00 ]
+global-symbols:
+ - name: _foo
+ type: N_SECT
+ scope: [ N_EXT ]
+ sect: 1
+ value: 0x0000000000000000
+undefined-symbols:
+ - name: _myGlobal
+ type: N_UNDF
+ scope: [ N_EXT ]
+ value: 0x0000000000000000