diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-09-15 19:16:28 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-09-17 19:48:42 +0200 |
commit | aeb92067f6ae994b541d7f9752fe54ed3d108bcc (patch) | |
tree | 9686e3eb1e5406df36e43aa5b6b5776978681976 /arch/x86/boot/header.S | |
parent | x86/boot: Define setup size in linker script (diff) | |
download | linux-aeb92067f6ae994b541d7f9752fe54ed3d108bcc.tar.xz linux-aeb92067f6ae994b541d7f9752fe54ed3d108bcc.zip |
x86/boot: Derive file size from _edata symbol
Tweak the linker script so that the value of _edata represents the
decompressor binary's file size rounded up to the appropriate alignment.
This removes the need to calculate it in the build tool, and will make
it easier to refer to the file size from the header directly in
subsequent changes to the PE header layout.
While adding _edata to the sed regex that parses the compressed
vmlinux's symbol list, tweak the regex a bit for conciseness.
This change has no impact on the resulting bzImage binary when
configured with CONFIG_EFI_STUB=y.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230915171623.655440-14-ardb@google.com
Diffstat (limited to 'arch/x86/boot/header.S')
-rw-r--r-- | arch/x86/boot/header.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S index 06bd72a324c1..34e9b35b827c 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.S @@ -233,7 +233,7 @@ sentinel: .byte 0xff, 0xff /* Used to detect broken loaders */ hdr: .byte setup_sects - 1 root_flags: .word ROOT_RDONLY -syssize: .long 0 /* Filled in by build.c */ +syssize: .long ZO__edata / 16 ram_size: .word 0 /* Obsolete */ vid_mode: .word SVGA_MODE root_dev: .word 0 /* Default to major/minor 0/0 */ |