[PATCH] D134164: [RelocationResolver] Add R_RISCV_SET8
Liao Chunyu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 20:17:05 PDT 2022
liaolucy updated this revision to Diff 461780.
liaolucy added a comment.
reserve 0xff.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134164/new/
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 (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.461780.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220921/b72feba6/attachment.bin>
More information about the llvm-commits
mailing list