Skip to content

ELF binary built linked against fake loader #102993

Closed

Description

hi, I'm compiling a Rust program on my ARM AArch64 machine which is running linux with a musl libc. Rust wants to compile the binary with the interpreter set as /lib/ld-linux-aarch64.so.1 which does not exist on my system. I do have /lib/ld-musl-aarch64.so.1 however.

As a result when I try to execute the binary built by rust in this case I just get ENOENT. In fact when I strace ./binary there is only a single syscall printed, the execve on the binary itself, which returns ENOENT. This makes me sad...

Manually loading the binary (ie running exec /lib/ld-musl-aarch64.so.1 $PWD/binary) gets me a lot farther in the execution of my program which then crashes for other reasons, presumably my fault :) But that's out of scope for this issue.

If it helps I installed Rust via rustup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.O-muslTarget: The musl libcT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions