| From 708f66acfec9a86f237726d45095cbd380fd83ca Mon Sep 17 00:00:00 2001 |
| From: Callum Farmer <gmbr3@opensuse.org> |
| Date: Wed, 21 Jun 2023 11:32:28 +0100 |
| Subject: [PATCH] riscv64: ignore unknown relocs |
| |
| Sometimes ld emits relocs such as R_RISCV_64 for unwind symbols |
| these don't need to be handled yet so just can be skipped otherwise |
| the binary will never load |
| |
| Upstream-Status: Backport [https://sourceforge.net/p/gnu-efi/code/ci/708f66acfec9a86f237726d45095cbd380fd83ca/] |
| Signed-off-by: Callum Farmer <gmbr3@opensuse.org> |
| --- |
| gnuefi/reloc_riscv64.c | 3 +-- |
| 1 file changed, 1 insertion(+), 2 deletions(-) |
| |
| diff --git a/gnuefi/reloc_riscv64.c b/gnuefi/reloc_riscv64.c |
| index 0b02d83..e429602 100644 |
| --- a/gnuefi/reloc_riscv64.c |
| +++ b/gnuefi/reloc_riscv64.c |
| @@ -81,8 +81,7 @@ EFI_STATUS EFIAPI _relocate(long ldbase, Elf_Dyn *dyn) |
| *addr = ldbase + rel->r_addend; |
| break; |
| default: |
| - /* Panic */ |
| - while (1) ; |
| + break; |
| } |
| rel = (Elf_Rela *)((char *)rel + relent); |
| relsz -= relent; |
| -- |
| 2.41.0 |
| |