diff --git a/configure.ac b/configure.ac index 4ffb68f..23dbc54 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/coff/pe.h b/src/coff/pe.h index 0d1036e..198f23d 100644 --- a/src/coff/pe.h +++ b/src/coff/pe.h @@ -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 diff --git a/src/image.c b/src/image.c index 3ada37b..a828b5a 100644 --- a/src/image.c +++ b/src/image.c @@ -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: