Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Better diagnostic when linker script was missing #44

Merged
merged 2 commits into from
Aug 31, 2020
Merged

Conversation

jonas-schievink
Copy link
Contributor

Before:

Error: .`.defmt` section not found

After:

Error: `.text` section is missing, please make sure that the linker script was passed to the linker

Closes #42

src/main.rs Outdated
elf.find_section_by_name(".text").ok_or_else(|| {
anyhow!(
"`.text` section is missing, please make sure that the linker script \
was passed to the linker"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also suggest looking into .cargo/config.toml? setting RUSTFLAGS also breaks linking like this

Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me; maybe add where to look?

@jonas-schievink jonas-schievink merged commit fae4a25 into main Aug 31, 2020
@jonas-schievink jonas-schievink deleted the diag-link.x branch August 31, 2020 15:40
@eHammarstrom
Copy link

This will save people getting started some time, I can vouch for that! 😆

Thanks @jonas-schievink

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagnose probable lack of linker script
3 participants