Skip to content

x86_64-unknown-linux-musl binaries have a DYNAMIC segment #80000

Closed
@remexre

Description

@remexre

On the current nightly and stable, compiling hello world with --target x86_64-unknown-linux-musl results in a static PIE binary that still has a DYNAMIC segment and .dynamic section. This causes file to report it as:

$ file /tmp/main
/tmp/main: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, stripped

This was previously reported as #79624, which I believe to be incorrectly closed: on a hand-created binary without a DYNAMIC segment, file reports:

$ file out/fa6l
out/fa6l: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.O-muslTarget: The musl libc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions