Using current binutils, attempting to build shim eventually
results in the following failure:
objcopy -D -j .text -j .sdata -j .data -j .data.ident \
-j .dynamic -j .rodata -j .rel* \
-j .rela* -j .dyn -j .reloc -j .eh_frame \
-j .vendor_cert -j .sbat -j .sbatlevel \
--target efi-app-riscv64 shimriscv64.so shimriscv64.efi
objcopy: shimriscv64.so: invalid bfd target
make: *** [Makefile:269: shimriscv64.efi] Error 1
Address the problem by backporting two upstream commits:
1b183017aa2f (Add basic support for RISC-V 64-bit EFI objects)
c53b543736cd (Handle "efi-app-riscv64" and similar targets in objcopy.)
With these changes, shim can be successfully built on riscv64.
Resolves: RHEL-88815
Signed-off-by: Andrea Bolognani <abologna@redhat.com>