Skip to content

Invalid local symbol errors linking shared library with rust-lld #128938

Open

Description

I have a project generating bindings for FMOD using bindgen: https://gitlab.com/spearman/fmod-rs/-/tree/master/fmod-sys

Trying to build and link an executable with rust-lld generates the following errors:

  = note: rust-lld: error: /home/spearman/rs/local/fmod-rs/fmod-sys/lib/x86_64/libfmod.so: invalid local symbol '__bss_start' in global part of symbol table
          rust-lld: error: /home/spearman/rs/local/fmod-rs/fmod-sys/lib/x86_64/libfmod.so: invalid local symbol '_end' in global part of symbol table
          rust-lld: error: /home/spearman/rs/local/fmod-rs/fmod-sys/lib/x86_64/libfmod.so: invalid local symbol '_edata' in global part of symbol table
          collect2: error: ld returned 1 exit status

For now I am using the rustflags option -Zlinker-features=-lld to avoid using rust-lld

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.T-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