diff options
author | Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> | 2025-05-27 08:30:47 +0200 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2025-05-31 10:03:19 +1200 |
commit | e3ea295a7e84f3e170525a4e73e9b7954032c815 (patch) | |
tree | 3a8a741a761a5c7609c670f7c28aaabf0199ce7d /scripts/build/libc/newlib.sh | |
parent | ef676fb85a371fcfb67335044bf35f65701360ea (diff) | |
download | crosstool-ng-e3ea295a7e84f3e170525a4e73e9b7954032c815.tar.gz crosstool-ng-e3ea295a7e84f3e170525a4e73e9b7954032c815.tar.bz2 crosstool-ng-e3ea295a7e84f3e170525a4e73e9b7954032c815.zip |
packages:mold: add version 2.40.0
Add newly released mold version 2.40.0 from upstream
https://github.com/rui314/mold
2.40.0
New Features
- mold now lays out DWARF32 debug info before DWARF64 in output debug
sections to mitigate relocation overflow issues with DWARF32 when a
debug info section exceeds 4 GiB. This should help people who are
building extremely large executables in debug mode.
Here are the details: By default, GCC and Clang emit DWARF32 even for
64-bit code. That is, the debug info typically uses 32 bit offsets to
refer to locations in other debug info sections while it uses 64 bits
to represent addresses. This imposes a limitation on the largest
offset DWARF32 debug info can refer to, which is 4 GiB. If the output
debug section exceeds that size, the linker may report a relocation
overflow error. You can instruct the compilers to emit DWARF64, which
uses 64 bits for inter-debug info references, if you are building an
extremely large executable. So, the proper fix for the relocation
overflow issue is to build all object files with -gdwarf64. However,
rebuilding all static libraries with the new compiler flag is not
always feasible for various reasons. This new feature mitigates the
issue by placing DWARF32 at the beginning of output debug info
sections, followed by DWARF64. By doing so, relocation overflow can be
prevented as long as the total size of DWARF32 remains under 4 GiB,
allowing users to continue using object files compiled without
-gdwarf64 in very large executables.
Note that mold only sorts debug section contents when their size
exceeds 4 GiB. Therefore, for most outputs, this mitigation doesn't
change the result at all.
Bug Fixes and Compatibility Improvements
- Fixed a regression introduced in 2.38.0 in which a thread-local
variable with an unusually large alignment might not have been aligned
properly. That caused mislinking of systemd when LTO was enabled
- Fixed a regression introduced in 2.38.0 in which --as-needed was
ignored when creating an executable under a rare condition.
- Fixed an assertion failure on some targets that is triggered when an
weak undefined symbol in an executable is promoted to a dynamic symbol
with the -z dynamic-undefined-weak option.
- mold now ignores --dynamic-linker if -static is given. The new
behavior is compatible with GNU ld.
Signed-off-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Diffstat (limited to 'scripts/build/libc/newlib.sh')
0 files changed, 0 insertions, 0 deletions