Closed
Description
I'm developing a platform for TockOS. They upgraded the nightly version from 03-06 to 06-03, and now llvm-objcopy produces a 160MB binary instead of a 74KB binary. I also tried on the latest nightly (06-09), and the result is the same.
I tried this code with the same .elf file:
~/.rustup/toolchains/nightly-2020-06-03-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-objcopy --output-target=binary ./edu-ciaa.elf ./edu-ciaa.06-03.bin
~/.rustup/toolchains/nightly-2020-03-06-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-objcopy --output-target=binary ./edu-ciaa.elf ./edu-ciaa.03-06.bin
I expected to see both binaries have roughly the same size, since both are applied to the same elf file. (which can be found here: https://github.com/dc740/tock/blob/fd6517da9f22d088a30d6b7cb767e42ab820814f/boards/ciaa/edu-ciaa/sample-edu-ciaa.elf )
Instead, the produced binary from nightly 03-06 is 74KB and the one produced by the newer nightly versions 06-03 and 06-19 is 160MB.
Meta
rustc --version --verbose
:
rustc 1.46.0-nightly (feb3536eb 2020-06-09)
binary: rustc
commit-hash: feb3536eba10c2e4585d066629598f03d5ddc7c6
commit-date: 2020-06-09
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Category: This is a bug.Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcIssue: Problems and improvements with respect to binary size of generated code.Helping to "clean up" bugs with minimal examples and bisectionsBugs identified for the LLVM ICE-breaker groupRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from stable to nightly.