Skip to content

Commit 53a7ea2

Browse files
committed
efi: libstub: Fix incorrect payload size in zboot header
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>
1 parent db14655 commit 53a7ea2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/firmware/efi/libstub/zboot.lds

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ SECTIONS
3838
}
3939
}
4040

41-
PROVIDE(__efistub__gzdata_size = ABSOLUTE(. - __efistub__gzdata_start));
41+
PROVIDE(__efistub__gzdata_size =
42+
ABSOLUTE(__efistub__gzdata_end - __efistub__gzdata_start));
4243

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

0 commit comments

Comments
 (0)