Skip to content
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

lld linker error on mips64[el] linux targets. #138479

Open
Wyvern opened this issue Mar 14, 2025 · 2 comments
Open

lld linker error on mips64[el] linux targets. #138479

Wyvern opened this issue Mar 14, 2025 · 2 comments
Labels
needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.

Comments

@Wyvern
Copy link

Wyvern commented Mar 14, 2025

When cross-compiling to mips64[el] linux targets using -Zbuild-stdgot lld linking error:

linking with `mips64-linux-gnuabi64-gcc` failed: exit status: 1

rust-lld: error: /usr/lib/gcc-cross/mips64el-linux-gnuabi64/12/../../../../mips64el-linux-gnuabi64/lib/../lib/crtn.o: requires an executable stack, but -z execstack is not specified
          rust-lld: error: /usr/lib/gcc-cross/mips64el-linux-gnuabi64/12/../../../../mips64el-linux-gnuabi64/lib/../lib/crti.o: requires an executable stack, but -z execstack is not specified
          rust-lld: error: /usr/lib/gcc-cross/mips64el-linux-gnuabi64/12/../../../../mips64el-linux-gnuabi64/lib/../lib/Scrt1.o: requires an executable stack, but -z execstack is not specified

Rust 1.87.0-nightly (cbfdf0b 2025-03-13)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 14, 2025
@saethlin saethlin added the S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. label Mar 14, 2025
@bjorn3
Copy link
Member

bjorn3 commented Mar 14, 2025

It seems like the C cross-compilation toolchain you used isn't compiled with non-executable stack. According to the error message lld doesn't allow this unless you explicitly tell it that it is ok to make the stack executable using -z execstack.

@Wyvern
Copy link
Author

Wyvern commented Mar 15, 2025

make the stack executable using -z execstack.

I tried this option, it doesn't work. And as I recalled mips64[el] targets can be compiled successfully without -z execstack before; not sure which change/commit change that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.
Projects
None yet
Development

No branches or pull requests

4 participants