1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 00:31:41 +03:00
Commit Graph

6911 Commits

Author SHA1 Message Date
Rui Ueyama
16eb5139f1 [RISC-V] Set DT_RISCV_VARIANT_CC if there's a dynamic symbol with STO_RISCV_VARIANT_CC 2024-10-02 20:41:13 +09:00
Rui Ueyama
35be7ba887 Refactor 2024-10-02 20:39:50 +09:00
Rui Ueyama
55f0289a41 Non-SHF_ALLOC sections' addresses should be displayed as zero for --Map 2024-09-30 13:28:22 +09:00
Rui Ueyama
36dd6babe1 Refactor 2024-09-29 19:04:22 +09:00
Rui Ueyama
91b6818b62 Revert "Refactor"
This reverts commit 9e9539144e because
the new code didn't compile on macOS.
2024-09-27 21:45:49 +09:00
Rui Ueyama
9e9539144e Refactor 2024-09-27 17:51:54 +09:00
Rui Ueyama
feb9b3eb4e Set 0 to DT_AARCH64_VARIANT_PCS
It looks like only the presence of the entry is important, but by
convention, GNU ld and lld set 0 to a DT_AARCH64_VARIANT_PCS dynamic
entry, so we should follow suit.
2024-09-27 17:51:54 +09:00
Rui Ueyama
4b3fc4e82a Refactor 2024-09-27 17:51:54 +09:00
Rui Ueyama
ed7cc1b85a Bump mold version to 2.34.0 2024-09-25 10:01:39 +09:00
Rui Ueyama
3711ddb95e Drop DEC Alpha processor support
Keeping DEC Alpha support is difficult because there are no Alpha
machines available for toolchain developers, and even if there were,
no modern Linux distros still support Alpha. For example, Debian
dropped Alpha support in Debian 6.0. As a result, I cannot test my
linker with real-world programs.

In fact, I believe mold has never been able to link real-world large
programs. Object files for Alpha are compiled with the small code
model by default, so it is not easy to support it in the linker.

There's no means to verify that my implementation is correct for Alpha
because Alpha's psABI has never been published by DEC. The most
"reliable" source of correctness is GNU ld's source code and comments.

Last but not least, I believe there are literally zero mold/Alpha
users. Unlike some other retro computers like the m68k, Alpha doesn't
seem to get much love from the community, perhaps because the
availability of Alpha machines was limited in the first place, even in
the 90s.

Therefore, I'll remove Alpha support now. If there's someone who wants
to keep it, we can resurrect and re-test it.

This change should make the mold binary size a little smaller.
2024-09-24 17:29:34 +09:00
Rui Ueyama
0ee12e4115 Do not strip linker-synthesized symbols when --retain-symbols-file is given
This is an attempt to fix https://github.com/rui314/mold/issues/1346
2024-09-21 17:08:32 +09:00
Rui Ueyama
87c9929df9
Merge pull request #1345 from andreas-schwab/main 2024-09-19 17:32:46 +09:00
Andreas Schwab
f5f14d3faa test/absolute-symbols.sh: move symbol address out of the heap
Fixes #1340

Signed-off-by: Andreas Schwab <schwab@suse.de>
2024-09-19 09:53:41 +02:00
Rui Ueyama
5be5ea9ff5 Fix CI 2024-09-18 15:18:44 +09:00
Rui Ueyama
f1739bffd0 Refactor 2024-09-18 15:03:54 +09:00
Rui Ueyama
1efbe3f141 Do not lower the priority of DSO symbols than in-archive symbols
This commit reverts 0612ea41f1 and
instead solves the original issue with a different approach.

Now, if a hidden symbol was resolved to a DSO symbol, we'll redo
symbol resolution so that the symbol won't be resolved to the same one
next time.

This should fix our build-all buildbot.
2024-09-17 13:23:17 +09:00
Rui Ueyama
5ba1c36fbb Refactor 2024-09-17 12:27:08 +09:00
Rui Ueyama
c217134d97 Refactor 2024-09-17 11:58:42 +09:00
Rui Ueyama
fea866d910 Refactor 2024-09-15 19:18:06 +09:00
Rui Ueyama
3b3bc7b41e Make builders runnable by hand 2024-09-15 19:13:45 +09:00
Rui Ueyama
0612ea41f1 Lower the priority of DSO symbols than in-archive symbols
Assume both `foo.a` and `bar.so` define the same symbol `baz`.
If `baz`'s symbol visibility is hidden, it needs to be resolved within
the output file, i.e., from `foo.a`. However, previously, such symbol
was resolved to the one in `bar.so`.

To fix the problem, we'll lower the symbol priority for DSOs.

Fixes https://github.com/rui314/mold/issues/1342
2024-09-15 17:17:43 +09:00
Rui Ueyama
940ac8125c Refactor 2024-09-15 16:22:18 +09:00
Rui Ueyama
583ba8ade1 Fix daily builder 2024-09-15 11:13:56 +09:00
Rui Ueyama
82feeed693 Build mold binary with mold 2024-09-14 19:11:51 +09:00
Rui Ueyama
e7e41329ef Refactor 2024-09-14 17:14:30 +09:00
Rui Ueyama
63d990e49a Upgrade upload-artifact github action 2024-09-14 16:00:17 +09:00
Rui Ueyama
8d5b753337 Fix buildbot 2024-09-14 15:10:50 +09:00
Rui Ueyama
431fc39db0 Change how we handle word-size absolute relocations
Word-size absolute relocations, such as R_X86_64_64, are special from
the linker's point of view because only such symbols can be promoted
to dynamic symbols. This patch handles them separately.
2024-09-14 11:59:20 +09:00
Rui Ueyama
7734a93217 Improve a test 2024-09-14 08:04:15 +09:00
Rui Ueyama
806d7409da Refactor 2024-09-07 19:47:18 +09:00
Rui Ueyama
2e326cc006 Refactor 2024-09-07 15:31:56 +09:00
Rui Ueyama
e1ace5ea00 Add a FreeBSD test runner 2024-09-02 14:58:30 +09:00
Rui Ueyama
8e010c2095 Update comments 2024-09-01 13:20:50 +09:00
Rui Ueyama
6758b53bff Fix CI 2024-08-31 15:14:26 +09:00
Rui Ueyama
f6822fb0f3 Make executables iwth zero-size segments loadable on FreeBSD
Fixes https://github.com/rui314/mold/issues/1338
2024-08-31 14:52:11 +09:00
Rui Ueyama
f0d39b2460 Add a rule for FreeBSD 2024-08-31 13:26:52 +09:00
Rui Ueyama
a3e69502b0 Refactor 2024-08-30 12:04:56 +09:00
Rui Ueyama
4645248106
Merge pull request #1337 from leleliu008/fix-netbsd-no-alloca.h 2024-08-30 04:58:24 +09:00
leleliu008
80648584cf alloca.h is missing on NetBSD
alloca(3) is defined in stdlib.h on NetBSD

Reference: https://man.netbsd.org/alloca.3

Signed-off-by: leleliu008 <leleliu008@gmail.com>
2024-08-29 20:22:03 +08:00
Rui Ueyama
d4c2073cda Fix test
Previous test passed even without 1c321022d0.
2024-08-27 20:09:40 +09:00
Rui Ueyama
fe7237e454
Merge pull request #1335 from ywgrit/main 2024-08-27 17:04:46 +09:00
Xin Wang
4da257e6fb LoongArch: change test of R_LARCH_CALL36 with bigger offset 2024-08-27 15:14:56 +08:00
Rui Ueyama
ed617fef05
Merge pull request #1170 from mominul/patch-1
Update README.md
2024-08-27 13:19:16 +09:00
Xin Wang
1c321022d0 LoongArch: fix error offset for relaxation of R_LARCH_CALL36 2024-08-26 16:37:09 +08:00
Rui Ueyama
ed4cae9354 Add a test 2024-08-24 14:33:13 +09:00
Rui Ueyama
2d390565c1 Fix the section-shrinking relaxation 2024-08-24 13:53:02 +09:00
Rui Ueyama
5e72d88940 Update a document 2024-08-24 13:21:38 +09:00
Rui Ueyama
213f2ecec5 Refactor 2024-08-23 13:45:02 +09:00
Rui Ueyama
23b3778383 Refactor 2024-08-22 18:25:28 +09:00
Rui Ueyama
b9776af9b2 Refactor 2024-08-22 17:34:42 +09:00