packages:mold: add version 2.38.1 #2346
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add newly released mold version 2.38.1 from upstream https://github.com/rui314/mold
2.38.1
2.38.0
New Features
The --audit and --depaudit options are now supported for compatibility with GNU ld.
Recent versions of LLVM support an alternative, experimental relocation table format called CREL. mold can now read object files containing CREL relocation tables.
[ARM32][ARM64][PPC32][PPC64] The branch instruction ranges of RISC processors are generally insufficient to support the medium code model because their instructions are typically 32 bits long, which makes it impossible to embed large immediate offsets. For example, ARM64’s branch instruction can target only PC ± 128 MiB. If the branch target is farther than that, the linker must emit a small piece of code—often called a thunk or branch island—to extend the branch range.
Previously, mold created unnecessary range extension thunks for symbols that had PLT entries. Now, mold does not create thunks unless they are truly needed.
Bug Fixes and Compatibility Improvements
Previously, --no-allow-shlib-undefined could cause a segmentation fault due to an out-of-bounds array access. This has been fixed.
--no-allow-shlib-undefined is enabled by default if the output type is an executable (as opposed to a shared library) for compatibility with other linkers.
mold could report a spurious "duplicate symbol" error when performing LTO. This bug has been fixed.
In rare cases involving symbol versioning, mold mistakenly filtered out necessary libraries specified with --as-needed. This bug has been fixed.
In rare cases involving symbol versioning, mold reported a spurious "undefined symbol" error. This bug has been fixed.
If the same symbol was defined with and without the default version (e.g., if an object file defined both foo and foo@@Version), mold mistakenly hid both symbols from the dynamic symbol table instead of exporting the default one (e.g., foo@@Version). This bug has been fixed.