1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-26 13:10:46 +03:00
Commit Graph

164 Commits

Author SHA1 Message Date
Rui Ueyama
a396fa400f Re-implement --gdb-index
This change reduces the size of the .gdb_index section. It also fixes
an issue with handling of clang-generated object files.
2023-10-17 10:27:30 +09:00
Rui Ueyama
d92af2456d Refactor 2023-10-07 16:39:46 +09:00
Tatsuyuki Ishi
9bb50ae7a5 [ELF] Move main() and redo_main() into a separate compile unit.
Despite the extern template items Clang 14 seems to insist on instantiating
elf_main(), with the hilarious consequence of the function being duplicated
quadratically to the number of archs.

Move this to a different CU so that the compiler cannot possibly
instantiate it more than once. This significantly speeds up compilation
related to main.cc.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2023-10-04 19:09:26 +09:00
Rui Ueyama
f843daee9b Revert "[ELF] Move main() and redo_main() into a separate compile unit."
This reverts commit 1d3706285e.

Fixes https://github.com/rui314/mold/issues/1122
2023-10-04 13:07:06 +09:00
Rui Ueyama
c7129916ee
Merge pull request #1121 from ishitatsuyuki/main-mono
[ELF] Move main() and redo_main() into a separate compile unit.
2023-10-03 19:01:43 +09:00
Tatsuyuki Ishi
1d3706285e [ELF] Move main() and redo_main() into a separate compile unit.
Despite the extern template items Clang 14 seems to insist on instantiating
elf_main(), with the hilarious consequence of the function being duplicated
quadratically to the number of archs.

Move this to a different CU so that the compiler cannot possibly
instantiate it more than once. This significantly speeds up compilation
related to main.cc.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2023-10-03 17:48:57 +09:00
Christoph Erhardt
5cf3e53ab9 Enable strict compiler warnings
Compiler warnings have the potential to uncover real bugs before they
make it into a commit. For example, the accidental fallthrough
introduced by commit 713d81947a and fixed
by commit 49f38828d1 could have been
detected by GCC.

Remove `-Wunused-variable` since it is implied by `-Wall`.
Add `-Wno-unused-parameter` to suppress warning spam regarding unused
parameters.

Signed-off-by: Christoph Erhardt <github@sicherha.de>
2023-10-03 08:50:44 +02:00
Rui Ueyama
79b3fc4b6a Bump mold version to 2.2.0 2023-09-24 12:28:19 +09:00
Rui Ueyama
db5fa8a8cd Remove incomplete MIPS support
I made a fair amount of effort to try to support MIPS, but it turned out
that it is much harder than expected. I punted it instead of making
further efforts.

The problem is the MIPS ABI is hostile to the linker in the modern
environment. MIPS object files are still compiled for the small code
model in which GOT entries and data in the small data area are expected
to be accessible with a single machine instruction with a 16-bit
displacement. In other words, .got/.sdata/.sbss are expected to be
smaller than 64 KiB. This might have been a reasonable assumption in the
90s, but it's not suitable for modern applications that can be 1000x
larger than the binaries in the 90s.

MIPS requires the linker to implement tons of workarounds for its legacy
ABI assumptions. Our incomplete MIPS support can build binaries that
pass all our unit tests. However, it needed more effort to support
real-world programs that are larger than our test cases.

At this point, I don't think it is productive to implement workarounds
for the old ABI that is stuck in the 90s. It is honestly annoying to
think about workarounds for the code that is intentionally compiled to
be hostile to the linker. The situation is unfortunate, but if the
Open Source community is still serious about MIPS, they should improve
the ABI and the compiler instead of asking us to implement the legacy
ABI.

Closes https://github.com/rui314/mold/issues/1040
2023-09-04 13:12:03 +09:00
Rui Ueyama
7f8872b2f1 Do not update auto-generated files' timestamp on cmake
Fixes https://github.com/rui314/mold/issues/1094
2023-08-28 12:36:44 +09:00
Rui Ueyama
d75386b545 Bump the required CMake version to 3.14
Because CREATE_LINK requires CMake 3.14.

Fixes https://github.com/rui314/mold/issues/1091
2023-08-20 08:33:41 +09:00
Rui Ueyama
f01817f39e Statically link more libraies if -DMOLD_MOSTLY_STATIC=1 2023-08-19 14:08:26 +09:00
Rui Ueyama
7f7a744ebb Use BLAKE3 instead of SHA256 for cryptographic hash computation
Closes https://github.com/rui314/mold/issues/1088
2023-08-16 12:18:10 +09:00
Rui Ueyama
d8baee9605 Refactor 2023-08-15 15:33:28 +09:00
Rui Ueyama
c1406860fa Fix -Wunused-variable
Fixes https://github.com/rui314/mold/issues/1086
2023-08-14 11:39:44 +09:00
Rui Ueyama
d78b748696 Bump mold version to 2.1.0 2023-08-13 13:35:43 +09:00
Rui Ueyama
9441170d39 Refactor 2023-08-11 01:30:43 +09:00
Jinyang He
03b1a1cc68 Add loongarch basic support
link: https://reviews.llvm.org/D138135
link: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
2023-08-07 10:17:29 +08:00
Alois Klink
3ed5b8ddf7 Install LICENSE.third-party when using CMake 2023-07-27 01:10:22 +01:00
Rui Ueyama
de991b519a Bump mold version to 2.0 2023-07-26 19:40:11 +09:00
Rui Ueyama
29dc0cf53f Initial MIPS64 support
Although incomplete, this implementation is capable of passing the
following tests:

  TRIPLE=mips64el-linux-gnuabi64 bash -x ../test/elf/hello-dynamic.sh
  TRIPLE=mips64-linux-gnuabi64 bash -x ../test/elf/hello-dynamic.sh
2023-07-14 15:11:53 +09: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
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
cca255e6be Bump mold version to 1.11.0 2023-03-16 14:01:09 +08:00
Rui Ueyama
294a467116 Rename files 2023-03-13 16:23:36 +08:00
Rui Ueyama
040180f933 Bump mold version to 1.10.1 2023-01-22 09:57:00 +08:00
Rui Ueyama
7e6554677f Fix out-of-bound memory access
Fixes https://github.com/rui314/mold/issues/969
2023-01-21 12:06:10 +08:00
Rui Ueyama
c935d6387a Bump mold version to 1.10.0 2023-01-20 15:03:58 +08:00
Rui Ueyama
29eb97fda5 Rename a file 2023-01-19 11:43:29 +08:00
Rui Ueyama
0a8e90bd84 Rename a file 2023-01-16 16:22:30 +08:00
Rui Ueyama
1e961000e6 Move more files under common/ 2023-01-16 15:35:24 +08:00
Rui Ueyama
6caf0867b0 Reorganize files 2023-01-16 15:27:10 +08:00
مهدي شينون (Mehdi Chinoune)
4e26d7b237 Fix building on MinGW-w64
Signed-off-by: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
2023-01-10 06:41:46 +01:00
Rui Ueyama
d71a672089 Fix an option name
LLVM lld does not accept `-gdb-index` as an option
2023-01-09 12:46:15 +08:00
Rui Ueyama
eba86d5312 Document TLS 2023-01-08 09:38:55 +08:00
Rui Ueyama
9f5b7e278f Enable -gdb-index when building mold 2023-01-07 17:26:08 +08:00
Rui Ueyama
ed42ce0d36 Do not install LICENSE file if it does not exist 2023-01-07 14:28:08 +08:00
Rui Ueyama
ad0b6d0ac6 Bump mold version to 1.9.0 2023-01-06 16:13:10 +08:00
Rui Ueyama
651adad5f2 Support 32-bit PowerPC ABI 2022-12-31 17:56:37 +08:00
Rui Ueyama
9c62c55a2c Rename a file 2022-12-29 17:39:39 +08:00
Rui Ueyama
34ca952a9b Refactor 2022-12-29 16:59:08 +08:00
Rui Ueyama
6231510794 Support DEC Alpha 2022-12-28 13:57:00 +08:00
Rui Ueyama
3411e17d8b [ELF] Support SH-4 ISA 2022-12-27 10:34:20 +08:00
Rui Ueyama
a49a201695 Bump mold version to 1.8.0 2022-12-25 19:55:07 +08:00
Rui Ueyama
a3a98ac5f5 Fix build failure on some targets
Fixes https://github.com/rui314/mold/issues/924
2022-12-25 11:47:31 +08:00
Rui Ueyama
ad79674ec5 Refactor 2022-12-25 08:31:33 +08:00
Ruoyu Zhong
a18fe8bccf
Install ld64.sold symlink
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2022-12-12 21:27:25 +08:00
Ruoyu Zhong
56c56cc450
Fix ld.sold symlink installation
Fixes #910.

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2022-12-12 21:25:32 +08:00
Rui Ueyama
a90e7ac782 Remove mold/macOS
mold/macOS will be available at https://github.com/bluewhalesystems/sold
as a source-available commercial product.
2022-12-12 17:05:09 +08:00
Rui Ueyama
bd584ac05e Automatically detect if mold is sold 2022-12-12 16:00:59 +08:00