summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/gnu-efi/gnu-efi/0001-riscv64-ignore-unknown-relocs.patch
blob: 5b3c152c5e06b8d6050e3d4fbe8ec168470505b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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