Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157720999
D21773.id62577.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21773.id62577.diff
View Options
Index: head/sys/riscv/riscv/elf_machdep.c
===================================================================
--- head/sys/riscv/riscv/elf_machdep.c
+++ head/sys/riscv/riscv/elf_machdep.c
@@ -373,6 +373,10 @@
break;
case R_RISCV_PCREL_HI20:
+ error = lookup(lf, symidx, 1, &addr);
+ if (error != 0)
+ return (-1);
+
val = addr - (Elf_Addr)where;
insn32p = (uint32_t *)where;
before32 = *insn32p;
@@ -385,6 +389,10 @@
break;
case R_RISCV_PCREL_LO12_I:
+ error = lookup(lf, symidx, 1, &addr);
+ if (error != 0)
+ return (-1);
+
val = addr - (Elf_Addr)where;
insn32p = (uint32_t *)where;
before32 = *insn32p;
@@ -396,6 +404,10 @@
break;
case R_RISCV_PCREL_LO12_S:
+ error = lookup(lf, symidx, 1, &addr);
+ if (error != 0)
+ return (-1);
+
val = addr - (Elf_Addr)where;
insn32p = (uint32_t *)where;
before32 = *insn32p;
@@ -412,6 +424,7 @@
if (error != 0)
return (-1);
+ val = addr;
insn32p = (uint32_t *)where;
before32 = *insn32p;
imm20 = calc_hi20_imm(val);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 25, 11:11 AM (1 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33508224
Default Alt Text
D21773.id62577.diff (1 KB)
Attached To
Mode
D21773: RISC-V: fix some broken relocation handling
Attached
Detach File
Event Timeline
Log In to Comment