[PATCH] D134164: [RelocationResolver] Add R_RISCV_SET8
Liao Chunyu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 00:15:17 PDT 2022
liaolucy created this revision.
liaolucy added reviewers: HsiangKai, luismarques, asb, MaskRay.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, evandro, sameer.abuasal, s.egerton, Jim, benna, psnobl, rogfer01, shiva0217, kito-cheng, simoncook, hiraditya, arichardson.
Herald added a project: All.
liaolucy requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134164
Files:
llvm/lib/Object/RelocationResolver.cpp
Index: llvm/lib/Object/RelocationResolver.cpp
===================================================================
--- llvm/lib/Object/RelocationResolver.cpp
+++ llvm/lib/Object/RelocationResolver.cpp
@@ -433,6 +433,7 @@
case ELF::R_RISCV_32_PCREL:
case ELF::R_RISCV_64:
case ELF::R_RISCV_SET6:
+ case ELF::R_RISCV_SET8:
case ELF::R_RISCV_SUB6:
case ELF::R_RISCV_ADD8:
case ELF::R_RISCV_SUB8:
@@ -463,6 +464,8 @@
return S + RA;
case ELF::R_RISCV_SET6:
return (A & 0xC0) | ((S + RA) & 0x3F);
+ case ELF::R_RISCV_SET8:
+ return (A & 0x00) | ((S + RA) & 0xFF);
case ELF::R_RISCV_SUB6:
return (A & 0xC0) | (((A & 0x3F) - (S + RA)) & 0x3F);
case ELF::R_RISCV_ADD8:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134164.461152.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220919/99ce77d1/attachment.bin>
More information about the llvm-commits
mailing list