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

cortex-m-rt: fix off-by-one in .text in FLASH section assert #573

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

9names
Copy link
Contributor

@9names 9names commented Jan 11, 2025

The original assertion states that is checking that .text is inside flash, but it also precludes .text being at the start of flash.

This shouldn't affect anyone using the linker script from within cortex-m-rt as the vector table is always at the start. Only folks using this script as a template for a custom linker script would notice this issue.

Background:
I was using this linker script as a template for writing a run-from-ram binary for rp2040.
The way the rp2040 tools identify a run-from-ram binary is that the entry point is the first thing in the binary.
So I moved the vector table back, and the Entry function to the start, and then hit this assertion.

@9names 9names requested a review from a team as a code owner January 11, 2025 00:01
@adamgreig adamgreig added this pull request to the merge queue Jan 11, 2025
@adamgreig
Copy link
Member

thanks!

Merged via the queue into rust-embedded:master with commit b02ec57 Jan 11, 2025
11 checks passed
@9names 9names deleted the fix_stext_assert branch January 11, 2025 00:46
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

Successfully merging this pull request may close these issues.

2 participants