Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error: fixup value out of range" while trying to emit asm with thin LTO #127

Closed
bugadani opened this issue Jun 15, 2022 · 1 comment
Closed
Assignees
Milestone

Comments

@bugadani
Copy link

bugadani commented Jun 15, 2022

This issue is a (currently) low-information report about a bug I've hit. Trying to generate the assembly listing of a pretty big project, I get the error in the title.

Some details:

The project is based on this CMake-first template. Probably not related, it just makes my life awkward here :)

Build used to compile (without a few flags): cargo +esp rustc --target xtensa-esp32-espidf -Z build-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- --emit asm

Project compiles with thin LTO enabled.
Assembly is emitted with LTO off.
Build fails with full LTO on, regardless of whether I'm trying to emit ASM or not.

Rustc version:

rustc +esp -vV
rustc 1.61.0-nightly (7476f4919 2022-05-17)
binary: rustc
commit-hash: 7476f4919da0ae346f96abe5561a493e0ea6a660
commit-date: 2022-05-17
host: x86_64-pc-windows-msvc
release: 1.61.0-nightly
LLVM version: 14.0.0

I am not yet able to reproduce this issue by building up a minimal project, but I am able to configure my big one to succeed (and give me a 29MB .s file. Let's hope it's not a total code size related issue :) ). I'll keep investigating.

Update:
This might be some LTO related issue instead of ASM. I'm getting this when not trying to emit ASM but having enabled full LTO.

@bugadani bugadani changed the title "error: fixup value out of range" while trying to emit asm "error: fixup value out of range" while trying to emit asm with thin LTO Jun 15, 2022
@MabezDev MabezDev added this to the 1.65.0.0 milestone Oct 6, 2022
@MabezDev MabezDev self-assigned this Oct 6, 2022
@MabezDev MabezDev closed this as completed Nov 3, 2022
@bugadani
Copy link
Author

bugadani commented Nov 3, 2022

Unfortunately, this is still present:

cargo +esp rustc --color=always --features="$default_config" --target="xtensa-esp32-espidf" -Z build-std="std,panic_abort" -Zbuild-std-features="panic_immediate_abort" -- --emit=asm

image

Thankfully ASM is more a nice to have than anything.

(I know I should provide a repro for this. Sorry for that.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants