summaryrefslogtreecommitdiff
path: root/sys-devel/mold/files/mold-1.3.1-fix-riscv-set32.patch
blob: 5613d8ddc00376b1b9450154930eb655e31f241c (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
From https://github.com/rui314/mold/pull/590
From 68bd00caa7c7946f380f72a5dd263e7c1d436e9f Mon Sep 17 00:00:00 2001
From: Alex Fan <alex.fan.q@gmail.com>
Date: Thu, 28 Jul 2022 14:04:21 +1000
Subject: [PATCH] [ELF][RISCV] add missing R_RISCV_SET32 in EhFrameSection

Signed-off-by: Alex Fan <alex.fan.q@gmail.com>
---
 elf/arch-riscv64.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/elf/arch-riscv64.cc b/elf/arch-riscv64.cc
index 8761c6ac..0c589118 100644
--- a/elf/arch-riscv64.cc
+++ b/elf/arch-riscv64.cc
@@ -183,6 +183,9 @@ void EhFrameSection<E>::apply_reloc(Context<E> &ctx, const ElfRel<E> &rel,
   case R_RISCV_SET16:
     *(ul16 *)loc = val;
     return;
+  case R_RISCV_SET32:
+    *(ul32 *)loc = val;
+    return;
   case R_RISCV_32_PCREL:
     *(ul32 *)loc = val - this->shdr.sh_addr - offset;
     return;