Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47599 )
Change subject: arch/x86: Move prologue to .init section ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47599/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47599/4//COMMIT_MSG@17 PS4, Line 17: Description of .init section for ELF: : : This section holds executable instructions that contribute to the : process initialization code. When a program starts to run, the : system arranges to execute the code in this section before calling the : main program entry point (called main for C programs).
For x86 bootblocks .text._start must be at most 64 KiB from .reset. […]
But can't you just put the BOOTBLOCK_TOP parts before the INCLUDE "...program.ld" in that file? I think it's order of occurrence in the script file, not in linear address space. (I mean, I'm also fine with adding a new .init section instead if you consider that too hacky. But I'd like to keep .text._start and .text.stage_entry the way they are because that way they match the automatic -ffunction-section names for those functions.)