Commit Graph

76 Commits

Author SHA1 Message Date
Jakub Konka 03b33b0f01 test/link/macho: migrate all tests to the new test matrix 2024-01-24 12:34:40 +01:00
Jakub Konka 2b3ac3e82f test/link/macho: upgrade tbdv3 test 2024-01-24 12:34:40 +01:00
Jakub Konka a3f68c6fa2 test/link/macho: upgrade unwind info tests 2024-01-24 12:34:40 +01:00
Jakub Konka d500caaa62 test/link/macho: test stacksize option 2024-01-24 12:34:40 +01:00
Jakub Konka b70fedee7e test/link/macho: upgrade search strategy test 2024-01-24 12:34:40 +01:00
Jakub Konka 7dc6900018 test/link/macho: remove converted standalone tests 2024-01-24 12:34:40 +01:00
Jakub Konka 4dc1907a88 test/link/macho: upgrade strict validation of layout test 2024-01-24 12:34:40 +01:00
Jakub Konka a25b780aad test/link/macho: upgrade entry and entry in archive tests 2024-01-24 12:34:40 +01:00
Jakub Konka 82a044f4f7 test/link/macho: upgrade empty object test 2024-01-24 12:34:40 +01:00
Jakub Konka a454ba7908 test/link/macho: upgrade dylib test 2024-01-24 12:34:40 +01:00
Jakub Konka 181e476915 test/link/macho: upgrade dead_strip_dylibs test 2024-01-24 12:34:40 +01:00
Jakub Konka 49a4b42995 test/link/macho: upgrade tls test 2024-01-24 12:34:40 +01:00
Jakub Konka 105655857f test/link/macho: upgrade weak framework test 2024-01-24 12:34:40 +01:00
Jakub Konka e96f8b817a test/link/macho: upgrade weak library test 2024-01-24 12:34:40 +01:00
Jakub Konka 2c0c86944e test/link/macho: upgrade and migrate headerpad test 2024-01-24 12:34:40 +01:00
Jakub Konka 49c11e0c34 test/link/macho: upgrade and migrate needed_library test 2024-01-24 12:34:39 +01:00
Jakub Konka d93a0763d4 test/link/link: pass build options to elf and macho tests 2024-01-24 12:34:39 +01:00
Jakub Konka 6cdcf61a5c test/link/macho: upgrade and migrate dead_strip test 2024-01-24 12:34:39 +01:00
Jakub Konka 11524e4d0c test/link/macho: migrate entry_in_dylib test to new test format 2024-01-24 12:34:39 +01:00
Jakub Konka 7566a8fbd8 test/link: spawn ELF and MachO tests from the same root test/link/link.zig 2023-11-10 13:44:43 +01:00
Jakub Konka aac04b4a5a elf: port some of zld's test harness 2023-09-26 21:07:47 +02:00
Andrew Kelley 1df4efc4bc disable failing wasm linking tests
These started failing after the LLVM 17 upgrade.

See tracking issues #16937 and #16938
2023-09-19 09:37:53 -07:00
Jakub Konka 573bb77ab6 macho: add smoke test for re-exports in static libs 2023-08-16 12:19:34 +02:00
Jakub Konka 16f09127b5 link-test: add matching test case for unwind info when MH_SUBSECTIONS_VIA_SYMBOLS is not set 2023-08-02 22:12:26 +02:00
Jakub Konka f821543e4b Merge pull request #16553 from ziglang/issue-11896
macho: fix parsing of TBDv3 dylib stubs
2023-07-26 18:22:59 +02:00
Jakub Konka 780f0b872a link-test: add test case for MachO bug 16308 2023-07-26 13:38:24 +02:00
Jakub Konka 5131d074d8 link-test: add test for TBDv3 updated parsing logic 2023-07-26 08:10:53 +02:00
Xavier Bouchoux 8142bc20ea test: linking static libraries built from intermediary object files 2023-07-11 11:46:59 +02:00
Jakub Konka c2554cf0f1 link-test: remove now obsolete UUID test for MachO 2023-06-19 11:33:06 +02:00
Andrew Kelley 13aa7871b2 Merge pull request #15101 from motiejus/glibc_compat
glibc: add backwards compatibility for some symbols
2023-04-06 17:15:58 -04:00
Jakub Konka 5d0bb50e3d link-test: add test for entry in a dynamic library for MachO 2023-04-01 14:22:44 +02:00
Jakub Konka 3874df839d link-test: add test for entry in a static archive for MachO 2023-04-01 14:22:44 +02:00
Motiejus Jakštys 652e8cf864 glibc compat: add a test and README 2023-03-28 22:29:20 +03:00
Andrew Kelley 66eb910fe4 remove redundant link test 2023-03-15 10:48:15 -07:00
Andrew Kelley 15c4fae1c9 re-enable the simple standalone tests 2023-03-15 10:48:14 -07:00
Andrew Kelley 1142e05343 re-enable macho linker tests 2023-03-15 10:48:14 -07:00
Andrew Kelley cdf0a2af58 re-enable wasm linker tests 2023-03-15 10:48:14 -07:00
Andrew Kelley 4efeeaac88 delete link test "static_lib_as_system_lib"
I disagree with this behavior and will be reverting the changes
corresponding to this test case.

Also this test case unnecessarily uses a .c file when a .zig file would
be preferred, and has a problematic dependency on the install step,
preventing this test case from playing nicely with the cache.
2023-03-15 10:48:14 -07:00
Andrew Kelley e122cd6312 new linker test harness
It's simpler and it takes advantage of
`std.Build.addAnonymousDependency`, which has a number of benefits,
including concurrenc and preventing extra zig-cache and zig-out
directories being created.

4 tests are ported over as an example.
2023-03-15 10:48:14 -07:00
Jakub Konka e0ccbff87d link-tests: test unwind info emitter via c++ exceptions 2023-01-20 20:57:40 +01:00
Luuk de Gram b9224c172f wasm-linker: Fix & mangle symbol name of imports
When outputting the names section, we should output the actual symbol
name rather than the import name. This makes sure that symbols with
an explicit name set have the correct name but retain the import name
too.

We also now correctly mangle the name of an extern function with an
explicit library name. This ensures that functions that have a
different library name, but the same import/function name, can be
resolved correctly with other modules and don't resolve to the
same symbol.
2023-01-03 10:02:54 +01:00
Luuk de Gram f9b3e8c762 test/link: add test case for exporting data syms 2023-01-02 18:36:18 +01:00
Luuk de Gram 3e32a18956 test/link: add test case for function table
Adds 3 linker tests to verify the indirect function table
functionality for importing, exporting and its regular definitions.
2023-01-02 18:36:18 +01:00
Luuk de Gram e4869eeac1 test/link: linker tests for all export cases
Adds a linker test case for each possible export case. This means
one where no exports are done (i.e. no flags set), when the -dynamic
flag is set, and finally when --export=<value> flag(s) are set.
2023-01-02 18:36:17 +01:00
Jakub Konka 2cb6db2219 link-tests: add macho strict validation test
Support more operators when running simple arithmetic tests, and
allow for int literals in the program spec.
2022-12-23 14:02:52 +01:00
Jakub Konka 9ad24a4aee macho: add uuid link test 2022-12-16 18:31:48 +01:00
kcbanner ea84eda904 'fmt' 2022-11-26 17:16:56 -05:00
kcbanner 57bc61ab26 test-link: add -Denable-symlinks-windows to opt-in to using symlinks
Adds a way for standalone tests to declare they need symlinks, and these
tests won't be run on windows unless -Denable-symlinks-windows is set
2022-11-26 14:26:26 -05:00
Jakub Konka 72769f6cec link-tests: add test case for parsing weak imports 2022-11-06 15:21:28 +01:00
Jakub Konka 5ef33e7c7e Merge pull request #13459 from ziglang/issue-13457
macho: do not zero-out file if there are no nonzerofill sects
2022-11-06 08:39:13 +01:00