-
-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its 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
Fails to link on alpha: relocation truncated to fit: GPREL16 #1166
Comments
Ah, nice, so you have a physical Alpha machine. Let me try to debug it. I'll send you an email for a remote access. |
Sure thing thanks! You should be able to log in as |
When I tried to build mold on your Alpha machine, the last link step failed probably due to the out-of-memory error of the GNU linker. Do you mind if I ask how you built mold? |
What CFLAGS were you using? I have 10G of swap set up but after testing it myself I didn't even go through the 2G of physical RAM. Here is a tarball of the build directory. Here's a minimal reproducer to trigger the error, from inside
If you want to build from scratch with these settings, I think the following command should modify the build files:
Let me know if that is enough info to reproduce for you? |
Keeping DEC Alpha support is difficult because there are no Alpha machines available for toolchain developers, and even if there were, no modern Linux distros still support Alpha. For example, Debian dropped Alpha support in Debian 6.0. As a result, I cannot test my linker with real-world programs. In fact, I believe mold has never been able to link real-world large programs. Object files for Alpha are compiled with the small code model by default, so it is not easy to support it in the linker. There's no means to verify that my implementation is correct for Alpha because Alpha's psABI has never been published by DEC. The most "reliable" source of correctness is GNU ld's source code and comments. Last but not least, I believe there are literally zero mold/Alpha users. Unlike some other retro computers like the m68k, Alpha doesn't seem to get much love from the community, perhaps because the availability of Alpha machines was limited in the first place, even in the 90s. Therefore, I'll remove Alpha support now. If there's someone who wants to keep it, we can resurrect and re-test it. This change should make the mold binary size a little smaller.
As requested, I reran this using current binutils and latest mold tag (2.33.0). It now builds, but I get some test failures. See the following log: build.log Test failures seem to look like this:
|
I could actually build mold 2.33.0 on qemu-system-alpha (even though the build took very long because qemu-system-alpha doesn't support SMP), and all tests pass in my case. However, mold built using mold crash with SIGSEGV. It indicated that mold mis-links large programs. I suspect that that failed because of a similar reason as a (not integrated) MIPS support, as Alpha code seems to be compiled for the small code model by default. I don't think I have enough time to fix it. |
Hi, I am trying to build natively on alpha, but the final pass fails to link, with the following output.
This is using gcc 13.2.1, binutils 2.41, glibc 2.38.
After running through
c++filt
:I offer free shell access to the machine I reproduced this on if it will help debugging the problem.
The text was updated successfully, but these errors were encountered: