8000 mold 2.40.0 by BrewTestBot · Pull Request #224744 · Homebrew/homebrew-core · GitHub
[go: up one dir, main page]

Skip to content

mold 2.40.0 #224744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its 8000 maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2025
Merged

mold 2.40.0 #224744

merged 2 commits into from
May 26, 2025

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
mold 2.40.0 is a new release of the high-speed linker. It includes the following new features and bug fixes.

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. (19a1bc651fa43d3357d8e597140d788811ff177d, 159ce3ba6767b59a77140e34f101e595b7864a79)

    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 (#1463). (53c175850350ba24e264ffc3ac7979892b22bf4c)
  • Fixed a regression introduced in 2.38.0 in which --as-needed was ignored when creating an executable under a rare condition. (af36625a02957c9dc717954b8fbb5c28e1d7ac0e)
  • 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. (0fdffad57fa12210859724ac8ca43153755f08e5)
  • mold now ignores --dynamic-linker if -static is given. The new behavior is compatible with GNU ld. (c13ecc99ebce4686252ca56fcba0f8c67d8a90ac)

Acknowledgements

mold is an open-source project, and we accept donations via GitHub Sponsors and OpenCollective. We thank everyone who sponsors our project. In particular, we would like to acknowledge the following organizations and people who have sponsored $32/month or more during this release cycle:

View the full release notes at https://github.com/rui314/mold/releases/tag/v2.40.0.


@github-actions github-actions bot added the bump-formula-pr PR was created using `brew bump-formula-pr` label May 26, 2025
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label May 26, 2025
@BrewTestBot BrewTestBot enabled auto-merge May 26, 2025 10:24
@BrewTestBot BrewTestBot added this pull request to the merge queue May 26, 2025
Merged via the queue into master with commit a1ad924 May 26, 2025
17 checks passed
@BrewTestBot BrewTestBot deleted the bump-mold-2.40.0 branch May 26, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0