Skip to content

On riscv64gc linux, split-debuginfo ="unpacked" caused error: A dwo section may not contain relocations  #110224

Closed
@kxxt

Description

@kxxt

Problem

On riscv64gc linux, split-debuginfo ="unpacked" caused error: A dwo section may not contain relocations.

  • For rust > 1.64, this error occurs.
  • For rust <=1.64, cargo didn't pass -C split-debuginfo=unpacked flag to rustc.
    • For rust 1.64, a segmentation fault happens in rustc.
    • For rust < 1.64, it builds fine

I think the behavior of rust < 1.64 is correct.

Steps

The following steps:

cargo new failure
cd failure
echo "[profile.dev]" >> Cargo.toml
echo 'split-debuginfo = "unpacked"' >> Cargo.toml
cargo build

caused the following failure:

Compiling failure v0.1.0 (/root/failure)
error: A dwo section may not contain relocations

error: could not compile `failure` due to previous error

Possible Solution(s)

No response

Notes

Related: llvm/llvm-project#56642

Version

cargo 1.67.1 (8ecd4f20a 2023-01-10)
release: 1.67.1
commit-hash: 8ecd4f20a9efb626975ac18a016d480dc7183d9b
commit-date: 2023-01-10
host: riscv64gc-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: Linux [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-linkageArea: linking into static, shared libraries and binariesA-target-specsArea: Compile-target specificationsC-bugCategory: This is a bug.O-riscvTarget: RISC-V architectureT-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