-
Notifications
You must be signed in to change notification settings - Fork 32
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
link failure: read-only segment has dynamic relocations (arch/riscv/src/vector.o) #90
Comments
Do you have some method, about reproduce this issue on x86 machines? with gcc 14.2? Thanks |
I don't have an x86 machine any more so I am only able to work on the Pioneer box. I think the difference between my GCC and yours may be some hardening features. I ran gcc with
There is a lot of documentation for our hardened compiler, and red hat does something similar:
Maybe if you add those two linker flags you can reproduce it? |
Adding "-z now -z relro" doesn't help to reproduce this issue, but I'm using non hardened, non musl compiler riscv64-unknown-linux-gnu-gcc -static -nostartfiles -Wl,--cref -Wl,--gc-sections -Wl,-z,relro,-z,now -nostdlib -g -Wl,--no-dynamic-linker -Wl,-pie -Wl,--no-warn-rwx-segments $ gcc -v |
how about just kill _fw_start symbol? and see if it works for you, I just check it should produce same binary.. |
This works, thank you. I am afraid to reboot because I don't know where my SD card is, but it builds fine now with both gcc-14 and gcc-15. |
I rebooted today, no surprises. Thanks again. |
two weeks ago I couldn't reproduce this with gcc-14.2 (riscv64-linux-gnu-gcc) shipped from debian trixie (testing), on Pioneer. Might try again later this week since there are new commits in this repo.
@SophgoChaoWei Please do your development work on debian unstable/testing or archlinux or gentoo. Most people don't do devs on a stable distro release unless it's a backport, which is clearly not the case for zsbl. |
After #66 there is another RELRO failure using GCC 14/15 on my distro:
The text was updated successfully, but these errors were encountered: