• Michael Brown's avatar
    x86/efi: Include a .bss section within the PE/COFF headers · c7fb93ec
    Michael Brown authored
    The PE/COFF headers currently describe only the initialised-data
    portions of the image, and result in no space being allocated for the
    uninitialised-data portions.  Consequently, the EFI boot stub will end
    up overwriting unexpected areas of memory, with unpredictable results.
    
    Fix by including a .bss section in the PE/COFF headers (functionally
    equivalent to the init_size field in the bzImage header).
    Signed-off-by: default avatarMichael Brown <mbrown@fensystems.co.uk>
    Cc: Thomas Bächler <thomas@archlinux.org>
    Cc: Josh Boyer <jwboyer@fedoraproject.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
    c7fb93ec
build.c 12.4 KB