x86/boot: Construct PE/COFF .text section from assembler
authorArd Biesheuvel <ardb@kernel.org>
Fri, 15 Sep 2023 17:16:29 +0000 (17:16 +0000)
committerIngo Molnar <mingo@kernel.org>
Sun, 17 Sep 2023 17:48:43 +0000 (19:48 +0200)
commitefa089e63b56bdc5eca754b995cb039dd7a5457e
treef9b3196982887675b0e64b8685f1ebe3ffef4ead
parentaeb92067f6ae994b541d7f9752fe54ed3d108bcc
x86/boot: Construct PE/COFF .text section from assembler

Now that the size of the setup block is visible to the assembler, it is
possible to populate the PE/COFF header fields from the asm code
directly, instead of poking the values into the binary using the build
tool. This will make it easier to reorganize the section layout without
having to tweak the build tool in lockstep.

This change has no impact on the resulting bzImage binary.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230915171623.655440-15-ardb@google.com
arch/x86/boot/header.S
arch/x86/boot/tools/build.c