git: 6b9f6aeac69b - stable/13 - elftoolchain: update the list of riscv relocations
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Feb 2023 19:37:00 UTC
The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6b9f6aeac69b8bffc8db7a23e37fc1a4cdab43b8 commit 6b9f6aeac69b8bffc8db7a23e37fc1a4cdab43b8 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2023-01-28 18:19:26 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2023-02-06 19:34:37 +0000 elftoolchain: update the list of riscv relocations A few have been added, a couple removed. Reviewed by: jrtc27, imp, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38175 (cherry picked from commit 537c166b767879398338370701fa60f67acec112) --- contrib/elftoolchain/common/elfdefinitions.h | 12 ++++++++---- contrib/elftoolchain/libelftc/elftc_reloc_type_str.c | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/contrib/elftoolchain/common/elfdefinitions.h b/contrib/elftoolchain/common/elfdefinitions.h index 1b3a190ad055..0d230fffe3d3 100644 --- a/contrib/elftoolchain/common/elfdefinitions.h +++ b/contrib/elftoolchain/common/elfdefinitions.h @@ -2143,14 +2143,18 @@ _ELF_DEFINE_RELOC(R_RISCV_SUB8, 37) \ _ELF_DEFINE_RELOC(R_RISCV_SUB16, 38) \ _ELF_DEFINE_RELOC(R_RISCV_SUB32, 39) \ _ELF_DEFINE_RELOC(R_RISCV_SUB64, 40) \ -_ELF_DEFINE_RELOC(R_RISCV_GNU_VTINHERIT, 41) \ -_ELF_DEFINE_RELOC(R_RISCV_GNU_VTENTRY, 42) \ _ELF_DEFINE_RELOC(R_RISCV_ALIGN, 43) \ _ELF_DEFINE_RELOC(R_RISCV_RVC_BRANCH, 44) \ _ELF_DEFINE_RELOC(R_RISCV_RVC_JUMP, 45) \ _ELF_DEFINE_RELOC(R_RISCV_RVC_LUI, 46) \ -_ELF_DEFINE_RELOC(R_RISCV_GPREL_I, 47) \ -_ELF_DEFINE_RELOC(R_RISCV_GPREL_S, 48) +_ELF_DEFINE_RELOC(R_RISCV_RELAX, 51) \ +_ELF_DEFINE_RELOC(R_RISCV_SUB6, 52) \ +_ELF_DEFINE_RELOC(R_RISCV_SET6, 53) \ +_ELF_DEFINE_RELOC(R_RISCV_SET8, 54) \ +_ELF_DEFINE_RELOC(R_RISCV_SET16, 55) \ +_ELF_DEFINE_RELOC(R_RISCV_SET32, 56) \ +_ELF_DEFINE_RELOC(R_RISCV_32_PCREL, 57) \ +_ELF_DEFINE_RELOC(R_RISCV_IRELATIVE, 58) #define _ELF_DEFINE_SPARC_RELOCATIONS() \ _ELF_DEFINE_RELOC(R_SPARC_NONE, 0) \ diff --git a/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c b/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c index 4fa715ae0734..bc8ff6c0d2c6 100644 --- a/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c +++ b/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c @@ -656,14 +656,18 @@ elftc_reloc_type_str(unsigned int mach, unsigned int type) case 38: return "R_RISCV_SUB16"; case 39: return "R_RISCV_SUB32"; case 40: return "R_RISCV_SUB64"; - case 41: return "R_RISCV_GNU_VTINHERIT"; - case 42: return "R_RISCV_GNU_VTENTRY"; case 43: return "R_RISCV_ALIGN"; case 44: return "R_RISCV_RVC_BRANCH"; case 45: return "R_RISCV_RVC_JUMP"; case 46: return "R_RISCV_RVC_LUI"; - case 47: return "R_RISCV_GPREL_I"; - case 48: return "R_RISCV_GPREL_S"; + case 51: return "R_RISCV_RELAX"; + case 52: return "R_RISCV_SUB6"; + case 53: return "R_RISCV_SET6"; + case 54: return "R_RISCV_SET8"; + case 55: return "R_RISCV_SET16"; + case 56: return "R_RISCV_SET32"; + case 57: return "R_RISCV_32_PCREL"; + case 58: return "R_RISCV_IRELATIVE"; } break; case EM_S390: