OSDN Git Service

efi/x86: Drop redundant .bss section
authorArd Biesheuvel <ardb@kernel.org>
Wed, 12 Feb 2020 10:26:10 +0000 (11:26 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2020 20:59:42 +0000 (21:59 +0100)
commit832187f03994b03b6cc4a3b9130d82b1ec5cbec4
tree8b8546a08b5974c05115576b51f36a786e1a1fde
parent223e3ee56f77570157aba8cc550208af430a869b
efi/x86: Drop redundant .bss section

In commit

  c7fb93ec51d462ec ("x86/efi: Include a .bss section within the PE/COFF headers")

we added a separate .bss section to the PE/COFF header of the compressed
kernel describing the static memory footprint of the decompressor, to
ensure that it has enough headroom to decompress itself.

We can achieve the exact same result by increasing the virtual size of
the .text section, without changing the raw size, which, as per the
PE/COFF specification, requires the loader to zero initialize the delta.

Doing so frees up a slot in the section table, which we will use later
to describe the mixed mode entrypoint.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/boot/header.S
arch/x86/boot/tools/build.c