Skip to content

Rust 1.59 using linux-musl and PIE #94364

Description

@amircodota

I'm trying to upgrade our codebase to rust 1.59.0. It compiles fine on 1.58.0.

For linux targets, we compile using the x86_64-unknown-linux-musl target.
But with 1.59.0, I'm getting many such errors

relocation R_X86_64_32 against `.bss.internal_state.3389' can not be used when making a PIE object; recompile with -fPIE

Followed by this

final link failed: nonrepresentable section on output

I'm guessing this has to do with this change.

I tried compiling with both -C relocation-model=pie and relocation-model=static but it did not seem to change much.

Any advice?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions