Rui Ueyama
67ec8f3376
[Mach-O] Handle symbols with N_WEAK_DEF|N_WEAK_REF as private extern
2022-06-03 13:23:45 +08:00
Rui Ueyama
0723476fa5
Add a test
2022-06-03 11:50:05 +08:00
Rui Ueyama
a50173c259
Revert "Refactor"
...
This reverts commit 280782b3ae
because
it broke CI.
2022-06-03 10:41:50 +08:00
Rui Ueyama
280782b3ae
Refactor
2022-06-03 10:14:12 +08:00
Rui Ueyama
5621394dc3
Do not use git
command in Makefile
...
Fixes https://github.com/rui314/mold/issues/529
2022-06-02 21:27:26 +08:00
Rui Ueyama
fa420c38d4
[Mach-O] Handle private extern symbols
2022-06-02 21:27:10 +08:00
Rui Ueyama
ae33fd278f
[Mach-O] Rename variables
2022-06-02 18:18:42 +08:00
Rui Ueyama
68a779f76b
[Mach-O] Fix a crash bug
2022-06-02 18:05:31 +08:00
Rui Ueyama
f730dde6e7
[Mach-O] Add -object_path_lto
2022-06-02 16:29:50 +08:00
Rui Ueyama
8cf514408b
[Mach-O] Print more staticstics numbers
2022-06-02 15:51:22 +08:00
Rui Ueyama
72c8446eb7
[Mach-O] Parallelize string merging
2022-06-02 14:25:52 +08:00
Rui Ueyama
f5d85e854f
wip
2022-06-02 14:03:08 +08:00
Rui Ueyama
4e845f3972
Fix CI
2022-06-02 14:01:15 +08:00
Rui Ueyama
03af112272
[Mach-O] Add -stats option
2022-06-02 13:57:48 +08:00
Rui Ueyama
66c1433be1
[Mach-O] Merge string constants in __TEXT,__cstring
2022-06-02 13:39:51 +08:00
Rui Ueyama
621e2edd65
Refactor
2022-06-02 11:14:30 +08:00
Rui Ueyama
03045cb2d0
Refactor
2022-06-02 10:27:44 +08:00
Rui Ueyama
a572b803d2
Refactor
2022-06-02 10:23:32 +08:00
Rui Ueyama
7c52c41d7b
Attempt to fix CI
2022-06-01 22:45:24 +08:00
Rui Ueyama
21fea57d99
[Mach-O] Parallelize export table construction
2022-06-01 22:31:26 +08:00
Rui Ueyama
965fa17b7b
[Mach-O] Fix thread-local variables
2022-06-01 15:00:17 +08:00
Rui Ueyama
826bb56d59
[Mach-O] Fix thread-local variables
2022-05-31 16:54:05 +08:00
Rui Ueyama
3f12a843a6
Revert "[Mach-O] Merge string constants in __TEXT,__cstring"
...
This reverts commit e770df42d9
because
it broke many clang tests.
2022-05-30 17:13:09 +08:00
Rui Ueyama
e895351481
Use bool bitfields instead of uint8_t
...
`bool foo : 1` is better `u8 foo : 1` because
struct {
bool foo : 1 = 0;
} bar;
bar.foo = 0xf000;
sets `bar.foo` to 1 while
struct {
u8 foo : 1 = 0;
} bar;
bar.foo = 0xf000;
does _not_ set `bar.foo` to 1 because it just truncates a given
integer to one bit and assign it to `bar.foo`.
2022-05-30 16:04:51 +08:00
Rui Ueyama
1eac1e6cb4
[Mach-O] Fix clang build
2022-05-30 14:58:41 +08:00
Rui Ueyama
0fab94639f
[Mach-O] Parallelize resolve_symbols()
2022-05-30 13:58:07 +08:00
Rui Ueyama
348f2bb9da
Refactor
2022-05-30 13:39:53 +08:00
Rui Ueyama
2f78d2eb94
[Mach-O] Parallelize a part of merge_cstring_sections()
2022-05-30 13:04:37 +08:00
Rui Ueyama
4826d393d1
[Mach-O] Set a LC_UUID even if -no_adhoc_codesign is given
2022-05-30 12:46:00 +08:00
Rui Ueyama
b82aa99bca
[Mach-O] Do not create LC_CODE_SIGNATURE if -no_adhoc_codesign is given
2022-05-30 12:26:05 +08:00
Rui Ueyama
080ebb9ee4
[Mach-O] Fix timer probers
2022-05-29 20:01:30 +08:00
Rui Ueyama
4f77af8e76
[Mach-O] Make export table size computation a bit faster
2022-05-29 19:51:02 +08:00
Rui Ueyama
cffcea8d44
[Mach-O] Parallelize __LINKEDIT segment members size computation
2022-05-29 19:19:18 +08:00
Rui Ueyama
4622b6b14c
Revert "[Mach-O] Use SHA1 instead of SHA256 for code signature"
...
This reverts commit 395b962c3d
because
it broke CI.
2022-05-29 16:57:50 +08:00
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