Comments (10)
Just to confirm: I can reproduce the issue if I build Clang with mold on ppc64le, right?
from mold.
Yes, except if it is caused by some extra LDFLAGS that we use (but you can see them in the log)
from mold.
I also see it on arm64:
https://llvm-jenkins.debian.net/job/llvm-toolchain-18-binaries/architecture=arm64,distribution=unstable,label=arm64/73/console
from mold.
It is not easy to reproduce the issue for me because it involves lots of Debian-specific toolings. Could you reproduce the issue just by building LLVM from source without using Debian-specific tools?
from mold.
Just running the cmake will all the arg should be good but I will try to make a test case. Any recommendation on what to do next?
Thanks
from mold.
I fired up debian:unstable docker image, installed build-deps for clang-18, installed mold, checked out the llvm repo from github, and then copy-and-pasted the cmake command line, but it built just fine. So I think there's a hidden condition to reproduce the issue. Ideally, I want to know a procedure to reproduce the issue with the docker image.
from mold.
I'm seeing the same thing on fedora 40 aarch64 (asahi linux) on a different codebase.
Trace:
Thread 1 "ld.mold" hit Breakpoint 1.1, mold::elf::OutputSection<mold::elf::ARM64>::create_range_extension_thunks (this=0x40cbe27ca80, ctx=...) at /usr/src/debug/mold-2.31.0-1.fc40.aarch64/elf/thunks.cc:257
257 assert(thunk->size() < max_thunk_size);
(gdb) bt
#0 mold::elf::OutputSection<mold::elf::ARM64>::create_range_extension_thunks (this=0x40cbe27ca80, ctx=...) at /usr/src/debug/mold-2.31.0-1.fc40.aarch64/elf/thunks.cc:257
#1 mold::elf::compute_section_sizes<mold::elf::ARM64> (ctx=...) at /usr/src/debug/mold-2.31.0-1.fc40.aarch64/elf/passes.cc:1429
#2 0x0000aaaaaafc6158 in mold::elf::elf_main<mold::elf::ARM64> (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/mold-2.31.0-1.fc40.aarch64/elf/main.cc:578
#3 0x0000aaaaaafb30a0 in mold::elf::redo_main<mold::elf::X86_64> (ctx=..., argc=82, argv=0xffffffffdae8) at /usr/src/debug/mold-2.31.0-1.fc40.aarch64/elf/passes.cc:26
#4 mold::elf::elf_main<mold::elf::X86_64> (argc=82, argv=0xffffffffdae8) at /usr/src/debug/mold-2.31.0-1.fc40.aarch64/elf/main.cc:366
#5 0x0000fffff7900a1c in __libc_start_call_main (main=main@entry=0xaaaaaaba0fc0 <main(int, char**)>, argc=argc@entry=82, argv=argv@entry=0xffffffffdae8) at ../sysdeps/nptl/libc_start_call_main.h:58
#6 0x0000fffff7900afc in __libc_start_main_impl (main=0xaaaaaaba0fc0 <main(int, char**)>, argc=82, argv=0xffffffffdae8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>)
at ../csu/libc-start.c:360
#7 0x0000aaaaaaba2a70 in _start ()
(gdb)
Dump: https://fromsmash.com/2qzqnkmPiN-it
from mold.
I need a reproducer to debug it. Is your program open-source?
from mold.
Here's a small reproducer:
$ ld.mold --version
mold 2.31.0 (compatible with GNU ld)
$ ld.mold -EL --hash-style=gnu --build-id --eh-frame-hdr -m aarch64linux -shared obj.o lib.a
ld.mold: /builddir/build/BUILD/mold-2.31.0/elf/thunks.cc:257: void mold::elf::OutputSection<E>::create_range_extension_thunks(mold::elf::Context<E>&) [with E = mold::elf::ARM64]: Assertion `thunk->size() < max_thunk_size' failed.
from mold.
Please try again with git head.
from mold.
Related Issues (20)
- mold: fatal: unknown command line option: -arch HOT 1
- ninja error "FindFirstFileExA" during build on windows with vs2022 HOT 1
- Error with `cargo build --release` on PPC64LE: Missing `R_PPC64_TPREL16_LO_DS` HOT 2
- Is -z x86-64-vX supported? HOT 2
- 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
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.