diff options
Diffstat (limited to 'binutils/bfd/elfxx-riscv.c')
-rw-r--r-- | binutils/bfd/elfxx-riscv.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/binutils/bfd/elfxx-riscv.c b/binutils/bfd/elfxx-riscv.c index 6053a74..447b791 100644 --- a/binutils/bfd/elfxx-riscv.c +++ b/binutils/bfd/elfxx-riscv.c @@ -674,6 +674,21 @@ static reloc_howto_type howto_table[] = 0, /* src_mask */ ENCODE_RVC_J_IMM (-1U), /* dst_mask */ TRUE), /* pcrel_offset */ + + /* High 6 bits of 18-bit absolute address. */ + HOWTO (R_RISCV_RVC_LUI, /* type */ + 0, /* rightshift */ + 2, /* size */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_RISCV_RVC_LUI", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + ENCODE_RVC_IMM (-1U), /* dst_mask */ + FALSE), /* pcrel_offset */ }; /* A mapping from BFD reloc types to RISC-V ELF reloc types. */ @@ -723,6 +738,7 @@ static const struct elf_reloc_map riscv_reloc_map[] = { BFD_RELOC_RISCV_ALIGN, R_RISCV_ALIGN }, { BFD_RELOC_RISCV_RVC_BRANCH, R_RISCV_RVC_BRANCH }, { BFD_RELOC_RISCV_RVC_JUMP, R_RISCV_RVC_JUMP }, + { BFD_RELOC_RISCV_RVC_LUI, R_RISCV_RVC_LUI }, }; /* Given a BFD reloc type, return a howto structure. */ |