Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elf: add missing RISC-V relocation constants #701

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/examples/src/readobj/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3091,6 +3091,14 @@ const FLAGS_R_RISCV: &[Flag<u32>] = &flags!(
R_RISCV_SET16,
R_RISCV_SET32,
R_RISCV_32_PCREL,
R_RISCV_IRELATIVE,
R_RISCV_PLT32,
R_RISCV_SET_ULEB128,
R_RISCV_SUB_ULEB128,
R_RISCV_TLSDESC_HI20,
R_RISCV_TLSDESC_LOAD_LO12,
R_RISCV_TLSDESC_ADD_LO12,
R_RISCV_TLSDESC_CALL,
);
const FLAGS_R_BPF: &[Flag<u32>] = &flags!(R_BPF_NONE, R_BPF_64_64, R_BPF_64_32);
const FLAGS_R_SBF: &[Flag<u32>] = &flags!(R_SBF_NONE, R_SBF_64_64, R_SBF_64_32);
Expand Down
8 changes: 8 additions & 0 deletions src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5866,6 +5866,14 @@ pub const R_RISCV_SET8: u32 = 54;
pub const R_RISCV_SET16: u32 = 55;
pub const R_RISCV_SET32: u32 = 56;
pub const R_RISCV_32_PCREL: u32 = 57;
pub const R_RISCV_IRELATIVE: u32 = 58;
pub const R_RISCV_PLT32: u32 = 59;
pub const R_RISCV_SET_ULEB128: u32 = 60;
pub const R_RISCV_SUB_ULEB128: u32 = 61;
pub const R_RISCV_TLSDESC_HI20: u32 = 62;
pub const R_RISCV_TLSDESC_LOAD_LO12: u32 = 63;
pub const R_RISCV_TLSDESC_ADD_LO12: u32 = 64;
pub const R_RISCV_TLSDESC_CALL: u32 = 65;

// BPF values `Rel*::r_type`.
/// No reloc
Expand Down
Loading