1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-19 17:07:29 +03:00
Commit Graph

6598 Commits

Author SHA1 Message Date
Rui Ueyama
2b67afb8a3 Simplify
We no longer use `sold` as a command name.
2024-05-03 15:55:26 +09:00
Rui Ueyama
20fa8d56f5 Bump mold version to 2.31.0 2024-05-03 10:04:55 +09:00
Rui Ueyama
ed1e3c06a2 Do not copy mold executable to a test directory
mold executable can be quite large (~600 MiB with debug info),
so we don't want to casually copy that file.
2024-05-03 10:04:01 +09:00
Rui Ueyama
fdbe7eecf9 Do not set root as the file owner 2024-05-02 14:52:17 +09:00
Rui Ueyama
16ad212919 Update the build script
It looks like ftp.gnu.org started redirecting incoming HTTP requests
to HTTPS.
2024-05-02 14:03:37 +09:00
Rui Ueyama
5c0cce3d6c
Merge pull request #1246 from thesamesam/which-hunt 2024-04-30 17:50:06 +09:00
Sam James
ec0a9d09dd
test: use command -v, not non-portable which
`which` isn't in POSIX and several Linux distributions are trying to
remove it from their base system, see e.g. https://lwn.net/Articles/874049/.

Just use `command -v` which is POSIX.

Signed-off-by: Sam James <sam@gentoo.org>
2024-04-30 07:54:40 +01:00
Rui Ueyama
ea054ccced Allow a newline or a tab at the begining of a linker script
Previously, the first four byte must have been "printable" bytes,
which exclude newlines or tabs.
2024-04-29 19:41:11 +09:00
Rui Ueyama
cbbe23aa46 Do not show "entry symbol not found" error when creating a DSO 2024-04-28 18:06:54 +09:00
Rui Ueyama
990b0daae2 Optimize Aho-Corasick string search
We use Aho-Corasick string search algorithm for version script.
If all symbols in a version script do not start with '*', we can
terminate the algorithm early.
2024-04-28 17:53:20 +09:00
Rui Ueyama
a16316e916 Show warning messages in purple instead of red 2024-04-28 16:56:25 +09:00
Rui Ueyama
14952546a4 Do not edit binary files with sed
Fixes https://github.com/rui314/mold/issues/1244
2024-04-28 15:43:28 +09:00
Rui Ueyama
020b1a78d9 Do not set the .text address as an entry adddress if -e is missing
lld does not do that too.
2024-04-28 15:43:28 +09:00
Rui Ueyama
6b70e02bf5 Report an error if a mergeable/merged section is too large
We use u32 as an index into mergeable/merged sections, so we cannot
handle extremely large sections.
2024-04-28 15:43:28 +09:00
Rui Ueyama
31969a2756 Refactor 2024-04-28 15:43:28 +09:00
Rui Ueyama
53ebcd80d8 Reduce memory usage
This change saves ~1 GiB memory allocation when linking ~3.8 GiB clang-19
binary because the binary contains tons of mergeable strings for debug info.
2024-04-26 14:51:01 +09:00
Rui Ueyama
d714301180 Optimize 2024-04-25 18:04:18 +09:00
Rui Ueyama
002d619b11 Attempt to fix a test failure
I believe some version of objcopy corrupts an object file when
renaming a section. In this change, I use sed instead of objcopy
as a workaround.

Fixes https://github.com/rui314/mold/issues/1244
2024-04-25 16:59:40 +09:00
Rui Ueyama
55bb6bc318 Refactor 2024-04-25 15:42:01 +09:00
Rui Ueyama
05066e5279 Refactor 2024-04-25 12:17:21 +09:00
Rui Ueyama
131993634f Simplify 2024-04-24 16:05:19 +09:00
Rui Ueyama
40f6b17eda Optimize 2024-04-24 14:32:44 +09:00
Rui Ueyama
7a8ebc4dc7 Refactor 2024-04-24 13:19:20 +09:00
Rui Ueyama
a9346f5c82 Add a test 2024-04-24 12:54:54 +09:00
Rui Ueyama
3104ce1dd2 Update the rule for Gentoo 2024-04-23 22:14:17 +09:00
Rui Ueyama
d213f2b25d Add a rule for Clear Linux 2024-04-23 21:49:15 +09:00
Rui Ueyama
813089047f Refactor 2024-04-23 21:49:15 +09:00
Rui Ueyama
0ed5a9842a Refactor 2024-04-23 13:42:46 +09:00
Rui Ueyama
f037cd0740 Refactor 2024-04-22 17:55:57 +09:00
Rui Ueyama
c9faf3d345 Optimize 2024-04-22 17:47:06 +09:00
Rui Ueyama
db8758060a Fix CI 2024-04-21 16:40:54 +09:00
Rui Ueyama
c8ac0919a9 Fix CI 2024-04-21 15:44:21 +09:00
Rui Ueyama
a2432e125a Refactor 2024-04-21 15:23:56 +09:00
Rui Ueyama
e498e2fd83 Do not create .copyrel.rel.ro if -z norelro is given 2024-04-21 14:52:51 +09:00
Rui Ueyama
c65121a370 Revert "Upgrade OneTBB in ./third-party to version 2021.12.0"
This reverts commit ddc63ba9b2 because it
broke macOS build.
2024-04-19 14:31:27 +09:00
Rui Ueyama
fdc935718d Upgrade zlib in ./third-party to v1.3.1 2024-04-19 13:03:36 +09:00
Rui Ueyama
18d3b64bfb Upgrade zstd in ./third-party to v1.5.6 2024-04-19 12:35:31 +09:00
Rui Ueyama
ddc63ba9b2 Upgrade OneTBB in ./third-party to version 2021.12.0 2024-04-19 12:28:54 +09:00
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