Open david-boles opened 2 years ago
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @therealprof (or someone else) soon.
Please see the contribution instructions for more information.
This PR might be a good idea regardless, but as another option to solve your problem I wonder if you could do this? I've done something very similar in the past to leave room for configuration data before the vector table in bootloader applications.
MEMORY {
HEADER : ORIGIN = 0x00008000, LENGTH = 32
FLASH : ORIGIN = ORIGIN(HEADER) + LENGTH(HEADER), LENGTH = 464K - LENGTH(HEADER)
RAM : ORIGIN = 0x20000000, LENGTH = 64K
}
SECTIONS {
.mcuboot_header . : {
FILL(0xAAAAAAAA)
. = . + 32;
} > HEADER
}
SECTIONS
{
.mcuboot_trailer . : {
FILL(0xFFFFFFFF)
. = . + 40;
} > FLASH
} INSERT AFTER .gnu.sgstubs;
adamgreig, that definitely works too and I'll probably go with that unless and until this gets merged. It would feel nicer if the header and trailer could be treated the same way though.
Not sure if this is the right way to do it; please let me know if there's a better alternative. I'm trying to add dummy sections for a bootloader header and trailer, this change allows my
memory.x
file to be pretty clear:It seemed like a simple and useful enough change that you might want to incorporate it.