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).
I wonder if we could first rename existing .text._start and .text.stage_entry both to .init._start.
I don't really understand the reason for not calling this .text.init anyway? We've always relied on those things being matched before .text.*, and it has always worked (I don't remember the exact rules, I think it might just be order of appearance in the linker script).
I mean, really, I think the .text._start and .text.stage_entry we have are already exactly for what you're trying to do here anyway, why not just use those rather than making another one?