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

5945 Commits

Author SHA1 Message Date
Alfred Morgan
552bcd18b1
updated to use correct nim config directory 2023-06-23 00:42:11 -07:00
Rui Ueyama
d4d93d7fb7 Format 2023-06-19 12:35:20 +09:00
Rui Ueyama
ebd780e8ba Support R_PPC64_REL32
Fixes https://github.com/rui314/mold/issues/1049
2023-06-17 19:00:55 +09:00
Rui Ueyama
65bd36ba40 Generate a PT_OPENBSD_RANDOMIZE segment 2023-06-14 14:08:40 +09:00
Rui Ueyama
bc86ab514f Add -nopie as an alias for -no-pie
OpenBSD seems to be using an alternative spelling for this option.
2023-06-14 09:55:55 +08:00
Rui Ueyama
8ee7773260 Do not use mimalloc on OpenBSD
It seems like mimalloc doesn't work on OpenBSD at all.
2023-06-13 11:10:04 +08:00
Rui Ueyama
e011889436 Fix build on systems without ucontext.h in libc
Upstream patch:
ea4e6156a2
2023-06-05 11:52:56 +09:00
Rui Ueyama
16e22ec067 Handle "amd64" as a synonym for "x86_64"
OpenBSD's `uname` returns `amd64` instead of `x86_64`.
2023-06-04 15:28:44 +09:00
Rui Ueyama
d2ee47a4ac Print out a hint about older versions of litbb
https://github.com/rui314/mold/issues/1031
2023-06-04 15:28:44 +09:00
Rui Ueyama
dce8ebe526
Merge pull request #1033 from ishitatsuyuki/wrap-mold
mold-wrapper: Wrap ld.mold as well.
2023-04-19 20:10:36 +09:00
Tatsuyuki Ishi
23de4be59f mold-wrapper: Wrap ld.mold as well.
Convenient if you have configured to use mold for a particular project but want
to test a new local build.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2023-04-19 19:35:29 +09:00
Rui Ueyama
76e3f87775
Merge pull request #1034 from ishitatsuyuki/errno 2023-04-19 19:26:54 +09:00
Tatsuyuki Ishi
fca6fad720 MappedFile: Fail on open() errors other than ENOENT.
open() can fail with transient reasons, such as running out of file descriptor
limit. Previously, this was treated the same as file not being found, which
caused confusing error messages [1].

With this change anything but ENOENT will be treated as a fatal error. This will
also include e.g. permission errors, but if there's something within the search
path that is not accessible, it's likely better to tell the user instead of
silently skipping it.

[1]: https://github.com/rui314/mold/issues/1026

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2023-04-19 17:29:37 +09:00
Rui Ueyama
ceffcfcadd Fix test
Fixes https://github.com/rui314/mold/issues/1030
2023-04-18 16:47:16 +09:00
Rui Ueyama
1ad19a4ce1 Simplify 2023-04-16 14:57:47 +09:00
Rui Ueyama
67a58c01d0 Update comments 2023-04-16 14:41:10 +09:00
Rui Ueyama
186ac191c4 Update comments 2023-04-15 15:15:18 +09:00
Rui Ueyama
34bf04bc41 Improve tests 2023-04-15 12:53:43 +09:00
Rui Ueyama
e6db53fadb Do not set STT_GNU_IFUNC to non-exported symbols
STT_GNU_IFUNC is significant only for exported symbols. Setting
non-exported symbol type to STT_GNU_IFUNC actually causes an issue
if the symbol is used as a canonical PLT because the runtime would
try to run the canonical PLT as an IFUNC.

Fixes https://github.com/rui314/mold/issues/1028
2023-04-15 12:32:21 +09:00
Rui Ueyama
461001328b Simplify 2023-04-02 09:09:04 +08:00
Rui Ueyama
4bffe26bc0 Support R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/361
2023-03-31 10:26:50 +08:00
Rui Ueyama
290b4eaa46 Refactor 2023-03-28 17:30:44 +08:00
Rui Ueyama
0f1b828e6a Refactor 2023-03-28 16:57:57 +08:00
Rui Ueyama
46288758a0 Improve README with ChatGPT 2023-03-22 16:48:14 +08:00
Rui Ueyama
e8789c71a4 Format 2023-03-22 16:35:22 +08:00
Rui Ueyama
f54203d76c Update the auto-generated manpage 2023-03-22 12:55:52 +08:00
Rui Ueyama
a5634794b3 Improve the man page
I made this change by asking GPT-4-based ChatGPT to improve this
document with an additional note that this document was written by a
non-native English speaker and may have wrong or unnatural phrases.
2023-03-22 12:40:35 +08:00
Rui Ueyama
b403b811cd Report a possible ODR violation
https://github.com/rui314/mold/issues/1019
2023-03-18 16:32:04 +08:00
Rui Ueyama
36fc065548 Add a feature to not run mold simultaneously
https://github.com/rui314/mold/issues/117
2023-03-17 14:58:27 +08:00
Rui Ueyama
39b4548a2a Simplify 2023-03-17 13:58:11 +08:00
Rui Ueyama
52f0c4a06f Fix typos 2023-03-17 13:49:59 +08:00
Rui Ueyama
c74fe12dd5 Fix test 2023-03-16 18:24:25 +08:00
Rui Ueyama
fe11565110 Improve comments 2023-03-16 18:08:44 +08:00
Rui Ueyama
cca255e6be Bump mold version to 1.11.0 2023-03-16 14:01:09 +08:00
Rui Ueyama
325d12d169 Upload test artifacts only on test failure 2023-03-15 08:32:51 +08:00
Rui Ueyama
2a26a0db64 Fix CI 2023-03-15 08:32:51 +08:00
Rui Ueyama
72c9425ae3
Merge pull request #1016 from marxin/fix-Wunused-but-set-variable
Fix warning: variable ‘check’ set but not used [-Wunused-but-set-variable]
2023-03-14 21:44:48 +09:00
Rui Ueyama
ff46c33d3f
Merge pull request #1015 from marxin/fix-Wint-in-bool-context
fix thunks.cc:81:32: warning: enum constant in boolean context [-Wint…
2023-03-14 21:44:33 +09:00
Martin Liska
c59b3f5fa5 Fix warning: variable ‘check’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Martin Liska <mliska@suse.cz>
2023-03-14 13:28:45 +01:00
Martin Liska
84a5509da2 fix thunks.cc:81:32: warning: enum constant in boolean context [-Wint-in-bool-context]
Fixes the following error:
/elf/thunks.cc:81:32: warning: enum constant in boolean context [-Wint-in-bool-context]
  return ty == R_PPC64_REL24 || R_PPC64_REL24_NOTOC;

Signed-off-by: Martin Liska <mliska@suse.cz>
2023-03-14 13:25:05 +01:00
Rui Ueyama
305153b9c7 Archive test results 2023-03-14 19:22:56 +08:00
Rui Ueyama
1adde7aa51 Make undefined symbol in a DSO to keep other DSOs alive
Fixes https://github.com/rui314/mold/issues/1014
2023-03-14 18:52:03 +08:00
Rui Ueyama
4fa2bc17b8 Allow empty mergeable sections
Fixes https://github.com/rui314/mold/issues/1012
2023-03-14 07:14:18 +08:00
Rui Ueyama
294a467116 Rename files 2023-03-13 16:23:36 +08:00
Rui Ueyama
67eb3069b3 Fix build failure
Fixes https://github.com/rui314/mold/issues/1008
2023-03-07 18:34:59 +08:00
Rui Ueyama
ad2694445c Import changes from sold 2023-03-07 15:57:28 +08:00
Rui Ueyama
6a1713e440
Merge pull request #1004 from ishitatsuyuki/lto-eh-frame 2023-03-07 12:01:54 +09:00
Tatsuyuki Ishi
62d65371d7 [ELF] Kill .eh_frame sections after symbol resolution.
Handle .eh_frame in a similar way as mergeable sections.

This seems to be required for GCC CRT compiled with LTO.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2023-03-06 13:22:06 +08:00
Rui Ueyama
c4722fe5ae Build Linux binaries on GitHub Actions 2023-03-05 14:46:32 +08:00
Tatsuyuki Ishi
13472be059 [ELF] Resolve .eh_frame symbols renamed by GCC LTO.
When LTO is enabled for CRT it seems symbols like __EH_FRAME_BEGIN__.lto_priv.0
can be created. Treat it as the same as the non-LTO variant.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2023-03-05 13:59:40 +08:00