Skip to content

rust-objcopy produces broken binary in nightly #102983

Closed as not planned
Closed as not planned
@dimpolo

Description

@dimpolo

I uploaded the elf file, some configuration info and a way to produce the correct and broken binary over at https://github.com/dimpolo/objcopybug

Code

With a recent nightly:

rustup component add llvm-tools-preview
git clone https://github.com/dimpolo/objcopybug.git
cargo run
md5sum *.bin

I expected to see this happen:
rust-objcopy should produce the same binary as the probe-rs tool.

Instead, this happened:
probe-rs produces a working binary, but rust-objcopy does not.

Version it worked on

According to @adamgreig the produced binary is correct on:
rust-objcopy --version: LLVM version 14.0.6-rust-1.64.0-stable

Version with regression

rustc --version --verbose:

rustc 1.66.0-nightly (db0597f56 2022-10-11)
binary: rustc
commit-hash: db0597f5619d5ed93feca28e61226d3581cc7867
commit-date: 2022-10-11
host: x86_64-pc-windows-msvc
release: 1.66.0-nightly
LLVM version: 15.0.2

Backtrace

$ md5sum *.bin
3cf91a2dc7fcbb1908236ae8c8b513b1  made_by_objcopy.bin
6929b9e1c099603e1ad1b87b6d30efc3  made_by_probe.bin

@rustbot modify labels: +regression-from-stable-to-nighlty -regression-untriaged

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.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