1
1
mirror of https://github.com/rui314/mold.git synced 2024-08-16 08:20:23 +03:00
Commit Graph

6511 Commits

Author SHA1 Message Date
Rui Ueyama
9bb1a8207a
Update README.md 2024-03-28 13:08:53 +09:00
Rui Ueyama
a9e76295ff Simplify 2024-03-28 11:52:33 +09:00
Rui Ueyama
4e3364ddd3 Format 2024-03-27 18:42:55 +09:00
Rui Ueyama
6e5ae45c1a Disable test on ppc64le
Fixes https://github.com/rui314/mold/issues/1221
2024-03-27 16:27:37 +09:00
Rui Ueyama
11c9376a50 Fix tests for musl libc-based systems
Fixes https://github.com/rui314/mold/issues/1221
2024-03-27 16:27:37 +09:00
Rui Ueyama
b5f2a7b1ce Do not call do_lto() if all LTO input files are dead
Fixes https://github.com/rui314/mold/issues/1226
2024-03-27 15:27:52 +09:00
Rui Ueyama
3df7c8e89c Export __global_pointer$ from executable
RISC-V psABI requires that symbol to be exported from an executable
if there's a GP-relative reference. For simplicity, we always export
it from executable as long as it has a .dynamic section.

https://github.com/rui314/mold/issues/1222
2024-03-25 17:57:52 +09:00
Rui Ueyama
0edbe29d38 Simplify 2024-03-25 17:57:52 +09:00
Rui Ueyama
8df5a76203 Attempt to fix Windows CI 2024-03-25 17:57:52 +09:00
Rui Ueyama
32c4a09deb Fix file paths in .repro tar file
Previously, all pathnames were accidentally recorded as the name of
the tar file itself.

Fixes https://github.com/rui314/mold/issues/1227
2024-03-25 17:15:51 +09:00
Rui Ueyama
ee6907f678 Fix "skipping incompatible file" errors
https://github.com/rui314/mold/pull/1217
2024-03-25 14:52:54 +09:00
Rui Ueyama
03640029db Refactor 2024-03-21 15:03:45 +09:00
Rui Ueyama
7a65ed9082 Refactor 2024-03-21 11:00:13 +09:00
Rui Ueyama
b10f818106 Attempt to fix Windows build 2024-03-21 10:42:30 +09:00
Rui Ueyama
caad70dd6f Do not group mergeable sections in an output file
Runtime doesn't care where mergeable sections are, but it's reported
that Valgrind does. So, grouping mergeable sections just doesn't seem
to make sense.

https://github.com/rui314/mold/pull/1223
2024-03-20 22:15:05 +09:00
Rui Ueyama
6fe4f23074 Attempt to fix CI 2024-03-20 18:41:57 +09:00
Rui Ueyama
fd8fb73492 Refactor 2024-03-20 17:37:57 +09:00
Rui Ueyama
7c8ed4d2e1 Refactor 2024-03-20 15:05:16 +09:00
Rui Ueyama
08fada7de0 Update README.md 2024-03-20 13:44:09 +09:00
Rui Ueyama
163975d82a Make linker script INPUT command to look for a file from the script's directory
https://github.com/rui314/mold/pull/1217
2024-03-19 17:16:38 +09:00
Rui Ueyama
dda521e2bc [ARM32] Show "recompile with -fPIC" error for absolute relocations
Fixes https://github.com/rui314/mold/issues/1220
2024-03-19 13:19:05 +09:00
Rui Ueyama
e7dc90dadc Refactor 2024-03-18 17:10:18 +09:00
Rui Ueyama
8375741489
Merge pull request #1201 from nga888/win-mem-map-output-file
Add "basic" support for memory mapping to Windows OutputFile
2024-03-16 11:35:25 +09:00
Rui Ueyama
042b14653e Do not update the man page for branches other than main 2024-03-16 09:18:48 +09:00
Rui Ueyama
c7f6a91da5 Bump mold version to 2.30.0
libtool mistakes mold 2.4.1 as GNU ld 2.4 and wrongly concludes that our
linker does not support anonymous versioning and suppresses some uses of
version scripts. That has been causing subtle compatibility issues with
programs that use libtool to create their .so files.

Here is the code that mistakes our linker as GNU ld:
https://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4?h=v2.4.7#n5066

As a workaround, I decided to bump our linker version so that the version
number is sufficiently large. This is admittedly ugly but I think it's the
simplest solution for the problem.
2024-03-15 18:40:46 +09:00
Rui Ueyama
c26260e38d Do not set symbol size to imported dynamic symbols
The dynamic linker does not seem to care about st_size of undefined
dynamic symbols, but semantically it shouldn't be an arbitrary number.
2024-03-15 11:35:48 +09:00
Rui Ueyama
ac04d79ad2 Extend test timeout from 1 hour to 3 hours 2024-03-15 11:35:43 +09:00
Rui Ueyama
052b89e8d6 Copy mold to the top source directory
test/gentoo-test.sh depends on the presence of the file.
2024-03-14 16:15:29 +09:00
Rui Ueyama
c395da1c54 Do not create an unnecessary gap in file for BSS
Fixes https://github.com/rui314/mold/issues/1216
2024-03-13 16:01:04 +09:00
Rui Ueyama
16b0564d49 Fix CI 2024-03-12 14:38:42 +09:00
Rui Ueyama
d21207cc79 Handle sections with an unknown section type as errors
Fixes https://github.com/rui314/mold/issues/1215
2024-03-12 14:13:52 +09:00
Rui Ueyama
c4b69a1077 Re-throw a signal
Previously, mold exists silently when it gets killed by SIGSEGV.
This change makes it verbose; now the parent process would report
an error.
2024-03-11 16:04:55 +09:00
Rui Ueyama
c85dd8881b Refactor 2024-03-10 18:21:04 +09:00
Rui Ueyama
8eae0a33b3 [PPC32] Do not discard .got2 even if --gc-sections is given
Even though .got2 may not be referenced directly, we use that section
when processing relocations.
2024-03-10 18:16:11 +09:00
Rui Ueyama
6356fa09e9 Fix gentoo package name 2024-03-09 16:18:07 +09:00
Rui Ueyama
641e7c2b05 Use madvise instead of munmap
Using madvise(2) is clearer than munmap(2), and the madvise approach
seems to be slightly faster than mmap on my machine.
2024-03-09 13:39:59 +09:00
Rui Ueyama
c60d1d0877 Use xxhash instead of gdb_hash for the internal hashmap for .gdb_index
Our ConcurrentMap uses linear probing to find unused hash table entry.
It gives up if 128 consective slots are occupied, and the whole process
dies with the "ConcurrentMap is full" error message. So our hash
function's quality must be high.

For .gdb_index, we used to use gdb_index() to compute keys for the
ConcurrentMap. It turned out that the function's quality is poor,
generating very similar output for short strings.

This commit changes the hash function to xxhash.

Fixes https://issues.chromium.org/issues/40276991#comment5
2024-03-06 13:12:53 +09:00
Rui Ueyama
c45dd19d47 Do not trap SIGABRT unless older versions of TBB is in use 2024-03-05 10:04:54 +09:00
Rui Ueyama
51f871f43b Silently ignore broken .llvm_addrsig
Fixes https://github.com/rui314/mold/issues/1213
2024-03-04 16:57:12 +09:00
Rui Ueyama
89a4720575 Correctly print out error messages from signal handlers 2024-03-03 14:27:43 +09:00
Rui Ueyama
081e447a1b Simplify 2024-03-02 17:42:57 +09:00
Rui Ueyama
da0ee683a3 Show sha256 checksum 2024-03-02 13:27:27 +09:00
Rui Ueyama
c6e5e2c0a0 Dogfood setup-mold 2024-03-01 20:23:35 +09:00
Rui Ueyama
fb3c166f80 Bump mold version to 2.4.1 2024-03-01 11:30:05 +09:00
Rui Ueyama
39643aaf94 Fix GCC warning
Fixes https://github.com/rui314/mold/issues/1208
2024-03-01 10:44:35 +09:00
Rui Ueyama
50bdf39ba5 Mark shared symbols as weak if all references are weak
Previously, mold marked an imported symbol as a strong one if the
symbol came from a DSO and was exported as a strong symbol by the DSO.
This logic resulted in a miscomputation of the weakness bit, causing a
compatibility issue with other linkers.

Now, an imported symbol is marked as strong only when there's at least
one strong reference to it. In other words, if all references to an
imported symbol are weak, the symbol will be imported as a weak one.

Fixes https://github.com/llvm/llvm-project/issues/83080
2024-02-29 12:57:11 +09:00
Rui Ueyama
1e413d4121 Fix GCC warning
Fixes https://github.com/rui314/mold/issues/1205
2024-02-28 14:03:41 +09:00
Rui Ueyama
fcda712238 Attempt to fix GCC warnings
Fixes https://github.com/rui314/mold/issues/1204
2024-02-27 16:38:45 +09:00
Rui Ueyama
d4ff48a07e [PPC64V2] Emit _savegpr0_*, _restgpr0_*, _savegpr1_* and _restgpr1_* symbols
Fixes https://github.com/rui314/mold/issues/1203
2024-02-27 14:35:19 +09:00
Rui Ueyama
21f25545a8 Update README 2024-02-27 12:02:44 +09:00