diff options
Diffstat (limited to 'test/mach-o/Inputs')
-rwxr-xr-x | test/mach-o/Inputs/DependencyDump.py | 30 | ||||
-rw-r--r-- | test/mach-o/Inputs/bar.yaml | 18 | ||||
-rw-r--r-- | test/mach-o/Inputs/exported_symbols_list.exp | 6 | ||||
-rw-r--r-- | test/mach-o/Inputs/full.filelist | 3 | ||||
-rwxr-xr-x | test/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylib | bin | 0 -> 20628 bytes | |||
-rw-r--r-- | test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a | bin | 0 -> 556 bytes | |||
-rw-r--r-- | test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o | bin | 0 -> 404 bytes | |||
-rw-r--r-- | test/mach-o/Inputs/libSystem.yaml | 13 | ||||
-rw-r--r-- | test/mach-o/Inputs/libbar.a | bin | 0 -> 824 bytes | |||
-rw-r--r-- | test/mach-o/Inputs/libfoo.a | bin | 0 -> 1320 bytes | |||
-rw-r--r-- | test/mach-o/Inputs/order_file-basic.order | 11 | ||||
-rw-r--r-- | test/mach-o/Inputs/partial.filelist | 3 | ||||
-rw-r--r-- | test/mach-o/Inputs/use-dylib-install-names.yaml | 28 |
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 Binary files differnew file mode 100755 index 0000000000000..71185fbdf7360 --- /dev/null +++ b/test/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylib 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 Binary files differnew file mode 100644 index 0000000000000..b12062941f376 --- /dev/null +++ b/test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a 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 Binary files differnew file mode 100644 index 0000000000000..f9a923d37db38 --- /dev/null +++ b/test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o 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 Binary files differnew file mode 100644 index 0000000000000..64cae6c749eee --- /dev/null +++ b/test/mach-o/Inputs/libbar.a diff --git a/test/mach-o/Inputs/libfoo.a b/test/mach-o/Inputs/libfoo.a Binary files differnew file mode 100644 index 0000000000000..21194efbabf92 --- /dev/null +++ b/test/mach-o/Inputs/libfoo.a 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 |