Commit Graph

6619 Commits

Author SHA1 Message Date
Rui Ueyama 3ec4b1787e Refactor 2024-05-08 16:43:42 +09:00
Rui Ueyama 74129bfc86 Fix a test
Fixes https://github.com/rui314/mold/issues/1249
2024-05-06 13:54:17 +09:00
Rui Ueyama 595f98da78 Do not attempt to run an executable built with `-z rodynamic`
Such executables seem to crash immediately on older systems.
2024-05-06 13:12:33 +09:00
Rui Ueyama 2649b69e95 Fix CI 2024-05-05 22:43:58 +09:00
Rui Ueyama d20dc21e2a Update mold.1 (automated commit) 2024-05-05 13:22:52 +00:00
Rui Ueyama 7ac0816aa9 Fix typo 2024-05-05 22:21:56 +09:00
Rui Ueyama 154b6b047d Update mold.1 (automated commit) 2024-05-05 13:19:41 +00:00
Rui Ueyama 9a233df7e2 Support `-z rodynamic`
LLVM lld supports the flag.

Fixes https://github.com/rui314/mold/issues/1253
2024-05-05 22:17:52 +09:00
Rui Ueyama 7b2cb47727 Refactor 2024-05-05 13:08:04 +09:00
Rui Ueyama d683e8aa0b Add a test for SHF_GNU_RETAIN 2024-05-05 12:41:55 +09:00
Rui Ueyama 5ec3d2dcc2 Do not use std::osyncstream 2024-05-04 20:37:28 +09:00
Rui Ueyama edcf252603 Rename SyncOut -> Out 2024-05-04 18:16:04 +09:00
Rui Ueyama 024b03791a Remove extraneous newlines from "symbol missing" errors 2024-05-04 18:09:25 +09:00
Rui Ueyama 230ef819c2 Refactor 2024-05-04 18:08:09 +09:00
Rui Ueyama 5bdf48695a Use std::osyncstream 2024-05-04 17:42:47 +09:00
Rui Ueyama 78fea38b12 Remove a use of thread-local variable 2024-05-04 17:42:46 +09:00
Rui Ueyama 4510f4af81 Use `pause` instruction on ARM7 and ARM8
https://github.com/rui314/mold/issues/1250
2024-05-04 13:09:36 +09:00
Rui Ueyama a3480e8a2b
Merge pull request #1251 from wahjava/fix-on-freebsd
Fix build on FreeBSD
2024-05-04 12:48:30 +09:00
Ashish SHUKLA 5396667ad5
Fix build on FreeBSD 2024-05-03 15:44:26 +00:00
Rui Ueyama f0f61cc7ad Do not use `yield` asm instruction on arm32
`yield` may not exist on older ARM processors.

Fixes https://github.com/rui314/mold/issues/1250
2024-05-03 21:44:27 +09:00
Rui Ueyama b237fd1ae9 Refactor 2024-05-03 20:35:14 +09:00
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