Skip to content

Commit 924221e

Browse files
committed
Add R_RISCV_GOT32_PCREL relocation
The relocation reuses an existing ID that was removed in the spec: riscv-non-isa/riscv-elf-psabi-doc#323 and later on reused as: riscv-non-isa/riscv-elf-psabi-doc#402
1 parent 8446af2 commit 924221e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

crates/examples/src/readobj/elf.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,8 +3097,7 @@ const FLAGS_R_RISCV: &[Flag<u32>] = &flags!(
30973097
R_RISCV_SUB16,
30983098
R_RISCV_SUB32,
30993099
R_RISCV_SUB64,
3100-
R_RISCV_GNU_VTINHERIT,
3101-
R_RISCV_GNU_VTENTRY,
3100+
R_RISCV_GOT32_PCREL,
31023101
R_RISCV_ALIGN,
31033102
R_RISCV_RVC_BRANCH,
31043103
R_RISCV_RVC_JUMP,

src/elf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5868,8 +5868,8 @@ pub const R_RISCV_SUB8: u32 = 37;
58685868
pub const R_RISCV_SUB16: u32 = 38;
58695869
pub const R_RISCV_SUB32: u32 = 39;
58705870
pub const R_RISCV_SUB64: u32 = 40;
5871-
pub const R_RISCV_GNU_VTINHERIT: u32 = 41;
5872-
pub const R_RISCV_GNU_VTENTRY: u32 = 42;
5871+
pub const R_RISCV_GOT32_PCREL: u32 = 41;
5872+
// 42 Reserved was R_RISCV_GNU_VTENTRY
58735873
pub const R_RISCV_ALIGN: u32 = 43;
58745874
pub const R_RISCV_RVC_BRANCH: u32 = 44;
58755875
pub const R_RISCV_RVC_JUMP: u32 = 45;

0 commit comments

Comments
 (0)