-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Weird behavior when trying to build a fully static binary with MUSL (x86_64-unknown-linux-musl) #79624
Comments
This happens because Static PIE is reported as "dynamically linked" by |
So, is there anything I could do regarding this issue ? |
I don't think anything needs to be done here? This
is the expected behavior, static position-independent executables are indeed executables, but they may confuse tools like |
Okay so, that means I got nothing to worry about, right ? |
Right, closing as not-an-issue. |
I am wonder that why it only enable I just want to build a i686 musl pie executeable file, but i found it link the crtbegin but not crtbeginS, and I finally found that |
I'm new with rust, just started playing around with it.
Output of
rustc --version --verbose
:Basically I'm not getting an executable-format(it's still executable tho, more like a lib) output binary when I specify
x86_64-unknown-linux-musl
as the target. This is what I ran:After that on checking the output executable with
file
, I get the following:Also on running
ldd
:While if I run
cargo build --release --target i686-unknown-linux-musl
, I kinda get my expected results.file output:
ldd output:
I'm sorry if I've misunderstood anything and thanks in advance :)
Tl;dr:
x86_64-unknown-linux-musl
build target is generatingELF LSB shared object (dynamically linked)
whilei686-unknown-linux-musl
is makingELF LSB executable (statically linked)
binary.The text was updated successfully, but these errors were encountered: