sbsigntool: add support for RISC-V 64-bit PE/COFF images

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Andreas Schwab 2021-06-04 14:36:17 +02:00 committed by James Bottomley
parent 4b8fc11877
commit 25af2eb5e3
3 changed files with 3 additions and 1 deletions

View File

@ -65,7 +65,7 @@ PKG_CHECK_MODULES(uuid, uuid,
dnl gnu-efi headers require extra include dirs
EFI_ARCH=$(uname -m | sed 's/i.86/ia32/;s/arm.*/arm/')
AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" ])
AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" -o "$EFI_ARCH" = riscv64 ])
##
# no consistent view of where gnu-efi should dump the efi stuff, so find it

View File

@ -152,6 +152,7 @@
#define IMAGE_FILE_MACHINE_TRICORE 0x0520
#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169
#define IMAGE_FILE_MACHINE_AARCH64 0xaa64
#define IMAGE_FILE_MACHINE_RISCV64 0x5064
#define IMAGE_SUBSYSTEM_UNKNOWN 0
#define IMAGE_SUBSYSTEM_NATIVE 1

View File

@ -239,6 +239,7 @@ static int image_pecoff_parse(struct image *image)
switch (magic) {
case IMAGE_FILE_MACHINE_AMD64:
case IMAGE_FILE_MACHINE_AARCH64:
case IMAGE_FILE_MACHINE_RISCV64:
rc = image_pecoff_parse_64(image);
break;
case IMAGE_FILE_MACHINE_I386: