-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
unknown relocation: R_ARM_PLT32 #934
Comments
R_ARM_PLT32 is marked as https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst#56111deprecated-relocations. We can still support it, but I want to know how it is being used. Can you upload your |
Sure, here is the libudev.a in a zip file: |
Thanks for the quick update. I compiled mold from the current master in the docker container and tried it, unfortunately I now get a crash: |
What docker container did you use? I'm asking because I want to run the same command as you run in the same container to reproduce the issue. |
Also please try again with the above commit. |
I used the docker container to build mold itself (i.e. running "./dist.sh"). I created a new binary from your current master, which seems to fix the crash but now gives the following error:
|
It looks like R_ARM_PLT32 can be applied to non-BL/non-BLX instructions, so we can't handle it as an alias for R_ARM_CALL. #934
How about this? |
With that the link finishes without errors. I still need to check whether the binary actually works... |
I have to correct myself, one of my binaries now can be linked, but another still fails with
The working binary is 18MB while the failing one is 35MB (when linked with gnu ld), maybe the error is caused by the size? |
Can you get a stance of the crashed program? |
What do you mean by "stance"? The weird thing is that the crash isn't deterministic. If I just run the same arm-none-linux-gnueabi-g++ link command several times, it often crashes but sometimes it links without a problem. |
Sorry, it was a typo (I input it from my iPhone). I meant "stack trace". |
I tried to run the link command in gdb to get a stacktrace, but the trace isn't really helping (if you have another way to get a proper trace, let me know): [Attaching after process 34526 vfork to child process 34531] Thread 4.6 "ld" received signal SIGSEGV, Segmentation fault. |
I made another test with a debug build of mold, maybe that is more helping, as there seems to be an assert triggering: [Attaching after process 2284 vfork to child process 2289] Thread 4.16 "ld" received signal SIGABRT, Aborted. |
When I link with the debug mold without gdb I get this output:
|
The initial problem seems to be fixed, but the segfault/assert still happens with the latest release. I created a new ticket for that issue so this one can be closed: #974 |
When I try to link my cross compiled ARM binary with mold 1.8.0, I get a lot of these errors from the libudev.a:
mold: error: ../Common/devices/udev/lib/arm/libudev.a(libudev.o):(.text): unknown relocation: R_ARM_PLT32
The text was updated successfully, but these errors were encountered: