[all-commits] [llvm/llvm-project] cdb9a0: [MC][CodeGen] Define R_RISCV_PLT32 and lower dso_l...

PiJoules via All-commits all-commits at lists.llvm.org
Wed Feb 22 17:28:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cdb9a0c086a5b7e0972957be91f5864647b05038
      https://github.com/llvm/llvm-project/commit/cdb9a0c086a5b7e0972957be91f5864647b05038
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2023-02-23 (Thu, 23 Feb 2023)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
    M llvm/lib/Target/RISCV/RISCVTargetObjectFile.cpp
    A llvm/test/CodeGen/RISCV/dso_local_equivalent.ll
    A llvm/test/MC/RISCV/elf-reloc-plt32.s

  Log Message:
  -----------
  [MC][CodeGen] Define R_RISCV_PLT32 and lower dso_local_equivalent to it

This introduces R_RISCV_PLT32, PC-relative data relocation that takes
the 32-bit relative offset to a function or its PLT entry from its
relocation location.

This is needed to support relative vtables on RISCV.

Github PR: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/363

The lld handling of this reloc is D143115.

Differential Revision: https://reviews.llvm.org/D143226




More information about the All-commits mailing list