Comments (3)
No segfault with sys-devel/mold-2.30.0
from mold.
Seems like the latest commit is what broke things but I don't know enough to know why:
dfa26d08823ca0c8b74773823a4909e988bc6740 is the first bad commit
commit dfa26d08823ca0c8b74773823a4909e988bc6740
Author: Rui Ueyama
Date: Sun Apr 14 15:03:53 2024 +0900
1;10;0cGive symbols in .so higher priority than those in .a
Previously, .so and .a were of the same priority and therefore symbols
in those were resolved based on their positions in the command line;
whichever file appears first in the command line took precedence.
Here is the problem we are trying to solve with this change: KiCad
passes unnecessary .a files to the linker along with some .so files.
Some symbols are defined both by .a and by .so.
If a symbol is resolved from .a, the linker pulls out the file from
the archive, but because the .a file does not really provide a
complete set of object files, it ended with "undefined symbol" error.
If a symbol is resolved from .so, everything is fine.
This is arguably a bug in KiCad, or at least depending on the order of
files in the command line is very fragile. But maybe this change could
fix the issue without too much side effects. So let's see how it goes.
Fixes https://github.com/rui314/mold/discussions/1234
elf/input-files.cc | 38 ++++++++++++++++++++------------------
elf/input-sections.cc | 1 +
test/elf/dso-weak-def.sh | 30 ++++++++++++++++++++++++++++++
test/elf/link-order.sh | 22 ----------------------
4 files changed, 51 insertions(+), 40 deletions(-)
create mode 100755 test/elf/dso-weak-def.sh
delete mode 100755 test/elf/link-order.sh
bisect found first bad commit
from mold.
Thank you for reporting the problem and bisecting. That's the very last commit I've made to the repo, and it also caused very subtle issues to other programs, so I think I need to revert it.
from mold.
Related Issues (20)
- Fails to build LLVM 18.1.6 with mold HOT 3
- Corrupts the `DWARF` section when relocating multiple objects into a single one HOT 3
- Feature request: Warn about reverse or cyclic dependencies
- MSYS2/UCRT64: LINKER_TYPE 'MOLD' is unknown or not supported by this toolchain. HOT 6
- Build mold from source with -march or -mcpu in the build script HOT 2
- mold support for Fortran HOT 1
- Segmentation fault when compiling ROOT HOT 4
- /usr/lib/mold/mold-wrapper.so: unsupported relocation type 1026 HOT 3
- Binary linked with mold segfaults immediately HOT 5
- [FEATURE REQ/BUG REP] SH4 endianas HOT 7
- x86_64-exception-multiple-ehframe test failure HOT 2
- corrupted .riscv.attributes ISA string
- Very slow symbol lookup speed with gdb HOT 3
- mold fails to build on Debian sid on most of the archs (`error: implicit declaration of function`)
- mold does not accelerate the compile process compare to normal config HOT 15
- Support `libdep` plugin HOT 8
- duplicate symbol of compiler_rt builtin functions HOT 16
- Reference counting of std::shared_ptr is non-atomic when using the mold linker HOT 5
- mold can't be built with itself on mingw HOT 2
- Higher zstd compression levels for debug info HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mold.