Skip to content

Commit

Permalink
efi: libstub: Fix incorrect payload size in zboot header
Browse files Browse the repository at this point in the history
The linker script symbol definition that captures the size of the
compressed payload inside the zboot decompressor (which is exposed via
the image header) refers to '.' for the end of the region, which does
not give the correct result as the expression is not placed at the end
of the payload. So use the symbol name explicitly.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
  • Loading branch information
Ard Biesheuvel committed Oct 21, 2022
1 parent db14655 commit 53a7ea2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/firmware/efi/libstub/zboot.lds
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ SECTIONS
}
}

PROVIDE(__efistub__gzdata_size = ABSOLUTE(. - __efistub__gzdata_start));
PROVIDE(__efistub__gzdata_size =
ABSOLUTE(__efistub__gzdata_end - __efistub__gzdata_start));

PROVIDE(__data_rawsize = ABSOLUTE(_edata - _etext));
PROVIDE(__data_size = ABSOLUTE(_end - _etext));

0 comments on commit 53a7ea2

Please sign in to comment.