1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-20 09:27:45 +03:00
Commit Graph

83 Commits

Author SHA1 Message Date
Rui Ueyama
fe72463f55 [Mach-O] Set mold's version to LC_BUILD_VERSION
I chose 0x6d6f6c64 as a magic number without coordinating with other
tools or Apple, but it should be fine.
2022-06-26 13:14:07 +08:00
Rui Ueyama
7b8d7a6417 [Mach-O] Add -order_file 2022-06-16 16:52:25 +08:00
Rui Ueyama
285ea7ba26 [Mach-O] Add -u 2022-06-16 14:24:59 +08:00
Rui Ueyama
30222dfb3f Revert "simplify opt_demangle setup"
This reverts commit f6b661a9051f5657ac701ea9c94dd54a85499365.
We want to make it possible to run two or more mold's `main` function
simultaneously in a single process, so we don't want to make `opt_demangle`
a global variable. That's why it was a thread-local variable.
2022-06-15 13:16:50 +08:00
Luboš Luňák
2af30acbb2 simplify opt_demangle setup
Setting it on demand is racy, and also not necessary, it's enough
to set it together with ctx.arg.demangle .

Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Rui Ueyama
b364b3f453 [Mach-O] Add -weak-l<LIB> 2022-06-06 14:02:28 +08:00
Rui Ueyama
2d34ba13cb [Mach-O] Report errors in -{un,}exported_symbols_list early 2022-06-05 18:02:47 +08:00
Rui Ueyama
c786f55370 Style fix 2022-06-05 12:58:11 +08:00
Rui Ueyama
8ff4bd5e0f [Mach-O] Ignore -order_file 2022-06-05 12:51:14 +08:00
Rui Ueyama
169a22d643 [Mach-O] Add -current_versin 2022-06-05 12:50:28 +08:00
Rui Ueyama
4a8cda75ad [Mach-O] Add -compatibility_version 2022-06-05 12:48:54 +08:00
Rui Ueyama
1f5da3d313 [Mach-O] Ignore comment lines in --exported_symbols_list file 2022-06-04 20:17:16 +08:00
Rui Ueyama
eee1a87742 [Mach-O] Define -weak_framework as an alias for -framework for now 2022-06-04 20:17:16 +08:00
Rui Ueyama
0de862191b [Mach-O] Add --unexported_symbol and --unexported_symbols_list 2022-06-03 19:48:57 +08:00
Rui Ueyama
7478c27ce8 [Mach-O] Add --exported_symbol and --exported_symbols_list 2022-06-03 18:55:00 +08:00
Rui Ueyama
f730dde6e7 [Mach-O] Add -object_path_lto 2022-06-02 16:29:50 +08:00
Rui Ueyama
03af112272 [Mach-O] Add -stats option 2022-06-02 13:57:48 +08:00
Rui Ueyama
8911458961 [Mach-O] Add -thread_count 2022-05-28 14:03:06 +08:00
Rui Ueyama
379ff3d781 Refactor 2022-05-27 16:15:09 +08:00
Rui Ueyama
f55fd7d9f2 [Mach-O] Compute LC_UUID as a tree hash of ad-hoc code signatures
We need to compute SHA256 hashes for a __code_signature section,
so recomputing a SHA256 hash of an entire file for an LC_UUID is
a waste of time. We can instead compute it as a tree hash.
2022-05-27 11:57:27 +08:00
Rui Ueyama
4d06199e0d [Mach-O] Add time probers 2022-05-25 14:05:32 +08:00
Rui Ueyama
e293d56cc1 [Mach-O] Add -sectcreate 2022-05-21 15:56:36 +08:00
Rui Ueyama
7f84e4242c [Mach-O] Add -export_dynamic 2022-05-21 15:16:51 +08:00
Rui Ueyama
deebb497d3 [Mach-O][LTO] Add a basic support of LTO
mold/macOS can now link a "hello world" program with LTO.
2022-05-16 15:07:09 +08:00
Rui Ueyama
3cf8fc4b35 [Mach-O] Add -no_uuid and -uuid_random and -final_output 2022-05-14 15:51:42 +08:00
Rui Ueyama
7f3a05ad0f [Mach-O] Add -hidden-l 2022-05-12 20:15:26 +08:00
Rui Ueyama
a5c7c98af8 [Mach-O] Add -stack_size 2022-05-12 19:07:04 +08:00
Rui Ueyama
00148f4d5e [Mach-O] Add -install_name 2022-05-12 18:55:56 +08:00
Rui Ueyama
9459b0f4f5 Refactor 2022-05-12 18:05:01 +08:00
Rui Ueyama
ee96875fcc [Mach-O] Add -macos_version_min 2022-05-12 17:48:14 +08:00
Rui Ueyama
4bc287ff48 [Mach-O] Add -search_paths_first and -search_dylibs_first 2022-05-12 16:49:10 +08:00
Rui Ueyama
b6e9c6da66 [Mach-O] Add -U 2022-05-10 20:02:48 +08:00
Rui Ueyama
c1ba1707fc [Mach-O] Add -force_load 2022-05-10 14:17:41 +08:00
Rui Ueyama
72ef8fc73a [Mach-O] Support -all_load 2022-05-09 16:48:12 +08:00
Rui Ueyama
4c758a62b1 [Mach-O] Fix bugs found by ASAN 2022-05-08 20:03:13 +08:00
Rui Ueyama
159d89036e [Mach-O] Enable conditional compilation for debugging 2022-05-08 18:38:39 +08:00
Rui Ueyama
58e43633fc Revert "Revert "Use C++17 filesystem API""
This reverts commit f29a85f20a with a fix
for a build failure.
2021-12-31 16:39:54 +09:00
Rui Ueyama
f29a85f20a Revert "Use C++17 filesystem API"
This reverts commit f6e91df440 because
it causes build breakages for a lot of Gentoo packages.
2021-12-30 22:15:52 +09:00
Rui Ueyama
f6e91df440 Use C++17 filesystem API 2021-12-30 21:32:01 +09:00
Rui Ueyama
0328f37b2a [Mach-O] Add -bundle 2021-12-05 16:52:35 +09:00
Rui Ueyama
c5f5e6153f [Mach-O] Add -headerpad_max_install_names 2021-12-05 15:53:41 +09:00
Rui Ueyama
6fae1d8555 [Mach-O] Report an error on -search_dylibs_first 2021-12-05 15:40:36 +09:00
Rui Ueyama
a3e0e9f197 wip 2021-12-04 16:41:51 +09:00
Rui Ueyama
16921c78ea [Mach-O] Add ARM64 stub 2021-12-02 11:51:42 +09:00
Rui Ueyama
4878b8bca2 [Mach-O] Make everything template 2021-12-01 22:02:33 +09:00
Rui Ueyama
6dfede035b Fix build breakage 2021-12-01 19:45:49 +09:00
Rui Ueyama
4bd92c0d46 [Mach-O] Do not emit PAGEZERO segment for dylibs 2021-12-01 15:14:38 +09:00
Rui Ueyama
57d7a2e8dd [Mach-O] Refactor 2021-12-01 13:50:34 +09:00
Rui Ueyama
8ceaf53728 [Mach-O] Add -needed_framework 2021-12-01 13:45:25 +09:00
Rui Ueyama
ee05f3a65f [Mach-O] Add -dead_strip_dylibs 2021-11-30 19:20:29 +09:00