Rui Ueyama
395b962c3d
[Mach-O] Use SHA1 instead of SHA256 for code signature
...
It looks like SHA1 is slightly faster than SHA256 on a 2021 ARM Mac mini.
SHA1 is not recommended anymore, but for ad-hoc code signing, it should
be enough because anyone can just recompute an ad-hoc code signature for
any arbitrary binary.
2022-05-29 15:10:02 +08:00
Rui Ueyama
f0f194e373
[Mach-O] Do not compute code signatures twice
2022-05-29 14:35:00 +08:00
Rui Ueyama
45615c9d81
[Mach-O] Speed up code signature computation
...
It looks like calling msync with MS_ASYNC can save ~130 ms per 1 GiB
output on an ARM Mac Mini 2021.
2022-05-29 14:29:26 +08:00
Rui Ueyama
d9e2669063
[Mach-O] Parallelize copy_buf even more
2022-05-29 12:58:58 +08:00
Rui Ueyama
d31b63e48b
Refactor
2022-05-28 21:40:41 +08:00
Rui Ueyama
5612636fe4
Refactor
2022-05-28 21:06:28 +08:00
Rui Ueyama
be19241630
Revert "[Mach-O] Parallelize resolve_symbols"
...
This reverts commit 4aeee88ef8
because
it has made mold unstable.
2022-05-28 15:38:35 +08:00
Rui Ueyama
2f243d2f52
Refactor
2022-05-28 15:34:33 +08:00
Rui Ueyama
8911458961
[Mach-O] Add -thread_count
2022-05-28 14:03:06 +08:00
Rui Ueyama
4aeee88ef8
[Mach-O] Parallelize resolve_symbols
2022-05-28 12:54:36 +08:00
Rui Ueyama
936d3b3c30
[Mach-O] Improve export table construction
2022-05-28 12:05:34 +08:00
Rui Ueyama
0a89a07e6d
[Mach-O] Parallelize remove_unreferenced_subsections
2022-05-28 10:53:03 +08:00
Rui Ueyama
79654bfde0
[Mach-O] Parallelize file parsing
...
`make test-tsan` started failing with this change, but I believe it
is an internal failure of Intel TBB itself.
2022-05-28 09:47:36 +08:00
Rui Ueyama
379ff3d781
Refactor
2022-05-27 16:15:09 +08:00
Rui Ueyama
c797408167
Refactor
2022-05-27 14:07:20 +08:00
Rui Ueyama
20ad945fbf
Fix CI
2022-05-27 14:02:30 +08:00
Rui Ueyama
702ec961ff
[Mach-O] Paralelize data copy
2022-05-27 13:25:11 +08:00
Rui Ueyama
5e4f8924fd
[Mach-O] Parallelize code signature computation
2022-05-27 12:02:06 +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
ae29091aa6
Tidy up a script
...
Fixes https://github.com/rui314/mold/issues/525
2022-05-26 21:46:18 +08:00
Rui Ueyama
e9f6715c6e
[ELF] Support --package-metadata
...
Fixes https://github.com/rui314/mold/issues/505
2022-05-26 21:04:36 +08:00
Rui Ueyama
7730cb3d25
Revert "[Mach-O] Parallelize file parsing and output section writing"
...
This reverts commit c36291be60
to unbreak CI.
2022-05-26 17:40:51 +08:00
Rui Ueyama
c36291be60
[Mach-O] Parallelize file parsing and output section writing
2022-05-26 17:19:12 +08:00
Rui Ueyama
c1164cda77
Attempt o fix CI
2022-05-26 15:42:57 +08:00
Rui Ueyama
e770df42d9
[Mach-O] Merge string constants in __TEXT,__cstring
2022-05-26 15:30:28 +08:00
Rui Ueyama
14c717d698
Refactor
2022-05-26 10:10:23 +08:00
Rui Ueyama
b32bc66901
Revert "Refactor"
...
This reverts commit 9e09a21eac
to unbreak CI.
2022-05-25 18:51:02 +08:00
Rui Ueyama
9e09a21eac
Refactor
2022-05-25 18:38:06 +08:00
Rui Ueyama
f5c8d7509e
Fix CI
2022-05-25 14:10:51 +08:00
Rui Ueyama
95164b3556
Refactor
2022-05-25 14:09:11 +08:00
Rui Ueyama
4d06199e0d
[Mach-O] Add time probers
2022-05-25 14:05:32 +08:00
Rui Ueyama
bd292ef782
[Mach-O] Support LC_LINKER_OPTION
...
Fixes https://github.com/rui314/mold/issues/523
2022-05-25 13:50:05 +08:00
Rui Ueyama
b626d74a5f
Do not crash if a symbol has not been resolved
2022-05-25 13:01:13 +08:00
Rui Ueyama
e7d4d2c39b
Format
2022-05-25 12:25:59 +08:00
Rui Ueyama
48c9157fb1
Refactor
2022-05-24 20:39:13 +08:00
Rui Ueyama
e37fe163b7
Fix CI
2022-05-24 20:04:41 +08:00
Rui Ueyama
4ca2d82da8
Fix CI
2022-05-24 19:56:54 +08:00
Rui Ueyama
2850c5cfe6
Fix CI
2022-05-24 19:48:13 +08:00
Rui Ueyama
75df1c82f1
[Mach-O] Implement range extension thunks
...
mold can now link LLVM/Clang 15 on macOS.
2022-05-24 18:25:21 +08:00
Rui Ueyama
754b995e1c
Refactor
2022-05-24 16:58:19 +08:00
Rui Ueyama
bafa43d4c7
Refactor
2022-05-24 16:39:54 +08:00
Rui Ueyama
760f39d129
Refactor
2022-05-24 15:52:33 +08:00
Rui Ueyama
99b622ffd1
Refactor
2022-05-24 15:01:29 +08:00
Rui Ueyama
7b097e51c9
Refactor
2022-05-24 14:19:22 +08:00
Rui Ueyama
16735e1e68
[ELF] Simplify range extension thunk algorithm
...
We eliminate unneeded symbols at the end of the algorithm, but that
didn't save too much space. In fact, I didn't observe any difference
by eliminating that last step from the algorithm.
2022-05-24 11:19:32 +08:00
Rui Ueyama
18e24a6e4d
[ELF][ARM32] Handle a displacement larger than 2^24
2022-05-23 20:47:52 +08:00
Rui Ueyama
29e15384ed
[ELF] Use an alternative instructions for PLT0
...
Previously, .plt must be within 128 MiB of .got.plt. The PLT0
instruction sequence in this commit does not have such limitation.
2022-05-23 19:27:40 +08:00
Rui Ueyama
229f610825
Revert "[Mach-O] Report relocation overflow error"
...
This reverts commit f844179fd3
because
it broke the build.
2022-05-23 13:48:09 +08:00
Rui Ueyama
e9def90e9a
Refactor
2022-05-23 13:47:32 +08:00
Rui Ueyama
f844179fd3
[Mach-O] Report relocation overflow error
2022-05-22 18:40:23 +08:00