1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-11 21:17:28 +03:00
Commit Graph

6560 Commits

Author SHA1 Message Date
Rui Ueyama
5576b88604 Upgrade blake3 in ./third-party to v1.5.1 2024-04-19 12:25:41 +09:00
Rui Ueyama
852be4a465 Refactor 2024-04-18 22:15:03 +09:00
Rui Ueyama
fb3c6029d0 Do not link against libblake3.so if we built it from ./third-party
Fixes https://github.com/rui314/mold/issues/1238
2024-04-18 21:57:16 +09:00
Rui Ueyama
9acd9ae894 Refactor 2024-04-18 21:08:48 +09:00
Rui Ueyama
d478addd2b Refactor 2024-04-18 20:47:14 +09:00
Rui Ueyama
6463a7c48a Fix non-deterministic behavior 2024-04-18 20:21:55 +09:00
Rui Ueyama
7434465334 Fix CI 2024-04-18 17:00:29 +09:00
Rui Ueyama
f7b705959e Remove a pragma
It looks like Clang recognize `#pragma GCC unroll`. Instead of adding
more C preprocessor directives here, I'd like to rely on the default
compiler optimizations.
2024-04-18 16:11:02 +09:00
Rui Ueyama
1648f716f4 Attempt to fix CI 2024-04-18 16:00:11 +09:00
Rui Ueyama
108b08fadb Fix a test 2024-04-18 14:47:36 +09:00
Rui Ueyama
204566cd14 Fix a crash bug involving synthesized symbols
If a synthesized symbol overrides an imported symbol, the symbol's
`is_imported` flag must be reset.

Technically, `compute_import_export` is called too early, and this
function call should be moved after `create_synthetic_sections`.
However, fixing the issue that way was very hard because until we
create output sections, we don't know what __start_/__stop_ symbols
need to be synthesized, but in order to create output sections,
we need to compute import/export bits.

So, in this commit, we simply reset `is_imported` flag for
synthesized symbols.

https://github.com/rui314/mold/pull/1236
2024-04-18 14:45:58 +09:00
Rui Ueyama
a3b4192e15 Revert "Give symbols in .so higher priority than those in .a"
This reverts commit dfa26d0882 because it
caused mysterious runtime issues with XWayland. I also observed that the
change affected gnupg and others.

Fixes https://github.com/rui314/mold/issues/1235
2024-04-15 21:42:52 +09:00
Rui Ueyama
dfa26d0882 1;10;0cGive symbols in .so higher priority than those in .a
Previously, .so and .a were of the same priority and therefore symbols
in those were resolved based on their positions in the command line;
whichever file appears first in the command line took precedence.

Here is the problem we are trying to solve with this change: KiCad
passes unnecessary .a files to the linker along with some .so files.
Some symbols are defined both by .a and by .so.

If a symbol is resolved from .a, the linker pulls out the file from
the archive, but because the .a file does not really provide a
complete set of object files, it ended with "undefined symbol" error.

If a symbol is resolved from .so, everything is fine.

This is arguably a bug in KiCad, or at least depending on the order of
files in the command line is very fragile. But maybe this change could
fix the issue without too much side effects. So let's see how it goes.

Fixes https://github.com/rui314/mold/discussions/1234
2024-04-15 12:19:50 +09:00
Rui Ueyama
2683a07955 Refactor 2024-04-14 19:11:54 +09:00
Rui Ueyama
62bfc5fd8c Remove unnecessary dependencies 2024-04-13 21:13:13 +09:00
Rui Ueyama
f666282b4e Silence -Wunused-result
Fixes https://github.com/rui314/mold/issues/1228
2024-04-13 17:30:56 +09:00
Rui Ueyama
77aefdf6a6 Refactor 2024-04-13 17:30:32 +09:00
Rui Ueyama
60ce1aaf01 Improve a test
We want to make sure that absolute symbols in DSOs are dynamically
resolved.
2024-04-12 16:36:40 +09:00
Rui Ueyama
496e2f3eb3 Refactor 2024-04-11 14:26:37 +09:00
Rui Ueyama
93bae76f49 Update mold.1 (automated commit) 2024-04-10 07:04:37 +00:00
Rui Ueyama
7d17aa83eb Add --Bsymbolic-non-weak and --Bsymbolic-non-weak-functions
GNU ld doesn't support these options, but LLVM lld do.
2024-04-10 16:00:19 +09:00
Rui Ueyama
7835e45ded Update mold.1 (automated commit) 2024-04-10 05:28:22 +00:00
Rui Ueyama
0cf209002c Update the man page 2024-04-10 14:27:50 +09:00
Rui Ueyama
57f2260301 Update mold.1 (automated commit) 2024-04-09 12:24:04 +00:00
Rui Ueyama
76445ce73c Update the man page 2024-04-09 21:23:28 +09:00
Rui Ueyama
99a5b1541e Support -z start-stop-visibility=hidden
Fixes https://github.com/rui314/mold/issues/826
2024-04-08 13:11:15 +09:00
Rui Ueyama
d432e987a0 Ignore --long-plt option
Our ARM32 PLT is always long, so we can safely ignore the flag.

Fixes https://github.com/rui314/mold/issues/1230
2024-04-06 10:29:38 +09:00
Rui Ueyama
71457375e4 Simplify 2024-04-05 22:37:12 +09:00
Rui Ueyama
8dc311c2d2 Attempt to fix CI 2024-04-05 22:31:27 +09:00
Rui Ueyama
faa5e57913 Simplify 2024-04-05 21:08:57 +09:00
Rui Ueyama
4396784dbd Handle STT_COMMON as a synonym for STT_OBJECT 2024-04-05 20:33:13 +09:00
Rui Ueyama
81b714c4f3 Simplify 2024-04-03 15:29:14 +09:00
Rui Ueyama
cb739c62a9 Refactor 2024-04-01 23:59:08 +09:00
Rui Ueyama
58cfc6ba39 Make RISC-V build reproducible 2024-03-30 16:28:46 +09:00
Rui Ueyama
fafc315dac Simplify 2024-03-29 21:52:52 +09:00
Rui Ueyama
ffcd64792d Update mold.1 (automated commit) 2024-03-29 11:14:42 +00:00
Rui Ueyama
8c24b22b2d Update the man page 2024-03-29 18:03:20 +09:00
Rui Ueyama
6fe9bdc3db Simplify 2024-03-29 17:43:06 +09:00
Rui Ueyama
9d8b243e39 Keep symbols specified by --undefined-glob during garbage collection 2024-03-29 17:39:12 +09:00
Rui Ueyama
9884e19b7f Attempt to fix Windows bot 2024-03-29 17:39:12 +09:00
Rui Ueyama
5304a343e4 Simplify 2024-03-29 15:42:10 +09:00
Rui Ueyama
38e8f06def Use trap instructions instead of nop to fill gaps 2024-03-29 15:39:59 +09:00
Rui Ueyama
b93b85bcd5 Refactor 2024-03-29 12:38:57 +09:00
Rui Ueyama
587360662c Refactor 2024-03-29 11:25:36 +09:00
Rui Ueyama
95431aa7cf Do not run certain tests on qemu user-mode emulation
Fixes https://github.com/rui314/mold/pull/1206
2024-03-28 23:29:53 +09:00
Rui Ueyama
7de092df28 Remove dead code 2024-03-28 18:01:03 +09:00
Rui Ueyama
03b57c2655 Simplify 2024-03-28 17:47:28 +09:00
Rui Ueyama
a1c835b993 Support --undefined-glob option 2024-03-28 16:44:43 +09:00
Rui Ueyama
4ada2f52da Refactor 2024-03-28 16:25:21 +09:00
Rui Ueyama
9bb1a8207a
Update README.md 2024-03-28 13:08:53 +09:00