Rui Ueyama
a7b8da9345
Simplify
2022-06-24 10:44:35 +08:00
Rui Ueyama
9e2e70ce7d
Merge pull request #540 from rbartlensky/allow-shlib-undefined
...
Implement `--(no-)allow-shlib-undefined.
2022-06-24 10:19:07 +08:00
Robert Bartlensky
21a2d6bb6c
Implement `--(no-)allow-shlib-undefined.
...
This also fixes the `note-property` test which was hanging on my
machine. Turns out `$CC` was stuck waiting to read from `stdin`,
and as such I decided to write something into it.
Signed-off-by: Robert Bartlensky <bartlensky.robert@gmail.com>
2022-06-23 23:46:15 +01:00
Rui Ueyama
9a3188bcf5
[Mach-O] Compute LC_UUID using the entire code signature section
...
We used to compute a file UUID using only the hashes in the code
signature section. So we computes the same UUID even if two files
are differnet only in some field of the code signature section.
2022-06-22 20:29:03 +08:00
Rui Ueyama
9cd811393f
Simplify
2022-06-22 14:14:08 +08:00
Rui Ueyama
8b86c49f42
[Mach-O] Make sure -thread_count works properly
2022-06-22 14:14:08 +08:00
Rui Ueyama
52943009b7
[ELF] Handle R_ARM_MOVT_PREL and R_ARM_PREL31 as non-address-taking relocations
...
This is an attempt to fix https://github.com/rui314/mold/issues/545 though
I don't know if this is a correct fix.
2022-06-19 11:32:08 +08:00
Rui Ueyama
00c16556de
Revert "[Mach-O] Do not fill text segment with 0x90"
...
This reverts commit b8f6fe1a1a
as an
attempt to fix CI.
2022-06-18 19:38:12 +08:00
Rui Ueyama
b8f6fe1a1a
[Mach-O] Do not fill text segment with 0x90
...
0x90 is a NOP on x86-64 but doesn't make sense on ARM.
2022-06-18 19:21:35 +08:00
Rui Ueyama
a9f063a394
[Mach-O] Parallelize claim_unresolved_symbols()
2022-06-18 19:16:28 +08:00
Rui Ueyama
b0ad0048b2
Simplify
2022-06-18 16:43:39 +08:00
Rui Ueyama
37d798f064
Simplify
2022-06-18 12:15:04 +08:00
Rui Ueyama
a9a8205be2
Bump mold version to 1.3.0
2022-06-18 11:29:18 +08:00
Rui Ueyama
0bbc1808cc
Merge pull request #544 from lancethepants/main
...
Also copy mold-wrapper.so from docker build.
2022-06-17 22:51:42 +08:00
lancethepants
cd3d82c89e
Also copy mold-wrapper.so from docker build.
...
Signed-off-by: Lance Fredrickson <lancethepants@gmail.com>
2022-06-17 08:32:31 -06:00
Rui Ueyama
52c8e09ddb
[ELF] Explain --icf=safe and --ignore-data-address-equality
2022-06-17 16:57:56 +08:00
Rui Ueyama
c214bfc96b
[Mach-O] Remove -dump
...
I added this option for debugging. Since mold is now mature enough,
we no longer need this option.
2022-06-16 20:53:27 +08:00
Rui Ueyama
7b8d7a6417
[Mach-O] Add -order_file
2022-06-16 16:52:25 +08:00
Rui Ueyama
cfb7c268f5
[Mach-O] Do not strip __eh_frame
2022-06-16 15:26:06 +08:00
Rui Ueyama
285ea7ba26
[Mach-O] Add -u
2022-06-16 14:24:59 +08:00
Rui Ueyama
603a831f02
[Mach-O] Improve performance of __cstring merging
2022-06-16 13:17:54 +08:00
Rui Ueyama
edfe9f30f2
[Mach-O] Do not enable -adhoc_codesign by default on Intel Mac
2022-06-16 12:23:03 +08:00
Rui Ueyama
5228fa2d78
Revert "[Mach-O] Add a hack to speed up code verification"
...
This reverts commit f3e1f728d3
.
I'm not 100% sure why, but now the code signature verification works
way faster than before. Maybe it has improved in macOS 12.4 which was
released last month?
2022-06-16 12:05:22 +08:00
Rui Ueyama
e4e267cc8b
Simplify
2022-06-16 11:25:30 +08:00
Rui Ueyama
75ac73809b
Remove dead code
2022-06-16 10:35:02 +08:00
Rui Ueyama
1b89d52504
[Mach-O] Reduce the number of personality functions
2022-06-15 20:34:00 +08:00
Rui Ueyama
b05a671789
[Mach-O] Do not split into subsections if MH_SUBSECTIONS_VIA_SYMBOLS is not set
2022-06-15 17:45:25 +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
Rui Ueyama
91aca3b7cf
Attempt to fix CI
2022-06-15 13:12:18 +08:00
Rui Ueyama
610e839e9e
Fix ASAN issue
2022-06-15 13:12:09 +08:00
Rui Ueyama
dcbc85b412
Attempt to fix CI
2022-06-15 11:52:45 +08:00
Rui Ueyama
7133f8a547
Attempt to fix CI
2022-06-15 11:41:45 +08:00
Rui Ueyama
792773be20
Simplify
2022-06-15 10:40:38 +08:00
Rui Ueyama
13816a14e1
Merge pull request #538 from llunak/better-undefined
...
Better reporting of undefined symbols
2022-06-15 10:28:56 +08:00
Rui Ueyama
8f02509ba6
Print out an error message if mold -run
is used on macOS
2022-06-09 10:36:02 -07:00
Luboš Luňák
87163c667a
fix tests to work with new undefined references reporting
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 13:32:23 +02:00
Luboš Luňák
e45bebd1c7
group undefined symbols when reporting them ( #508 )
...
The output now roughly matches the lld report format, with
each symbol followed by a limited list of places that reference it.
Lld can additionally read debuginfo to report the exact location,
but that would require writing an interpreter for .debug_line.
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Luboš Luňák
d0cc19735d
report also the referencing function for undefined symbols
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Luboš Luňák
2c9e97c768
move duplicated symbol_strtab to base class InputFile
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02:00
Luboš Luňák
114cb8e9c8
report also source file name in undefined symbol reports
...
Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
2022-06-09 12:40:09 +02: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
6f9eedf98a
[Mach-O] Fix an assertion failure
2022-06-07 20:15:47 +08:00
Rui Ueyama
e60bf30513
[Mach-O] Do not include duplicated symbols from re-exported libs
2022-06-07 14:46:16 +08:00
Rui Ueyama
610ce3c307
Refactor
2022-06-07 14:46:16 +08:00
Rui Ueyama
f3e1f728d3
[Mach-O] Add a hack to speed up code verification
2022-06-07 12:21:50 +08:00
Rui Ueyama
6f04ef9cf2
[Mach-O] Handle $ld$install_name$ symbols
2022-06-06 20:24:52 +08:00
Rui Ueyama
880204ebe5
[Mach-O] Handle $ld$hide$ symbols
2022-06-06 20:20:16 +08:00
Rui Ueyama
406d8786c9
Do not addd an element in a range-based loop
...
Adding a new element to a vector may invalidate existing iterators,
so it's not safe.
2022-06-06 20:10:30 +08:00
Rui Ueyama
e11e68d508
[Mach-O] Handle $ld$add$ symbols
2022-06-06 19:49:58 +08:00
Rui Ueyama
3af44d08db
Refactor
2022-06-06 18:52:14 +08:00