[PATCH] D80390: [WIP][mips] Support 64-bit relative relocations

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 22 01:13:57 PDT 2020


atanasyan added a comment.

In D80390#2049724 <https://reviews.llvm.org/D80390#2049724>, @MaskRay wrote:

> - `.quad foo - .` is representable
> - ld.so supports such relocation chain.
> - D78590 <https://reviews.llvm.org/D78590> can be fixed for MIPS
> - D72228 <https://reviews.llvm.org/D72228> can get rid of the `FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;` hack
> - For various relocation processing tool, it supporting a relocation chain as easy as supporting an addition relocation type (R_MIPS_PC64), by, adding `case R_MIPS_PC64:`?


Let's wait result of testing by Joe Holden. Interesting question - should we generate these 64-bit pc-relative relocations in `.eh_frame` always or provide some command line option to switch behaviour?

MIPS "relocation chain" is a standard feature defined by ABIs and should be supported by various tools including linkers. BFD and Gold linkers support it even better then LLD because they can handle arbitrary set of relocations in a chain.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80390/new/

https://reviews.llvm.org/D80390





More information about the llvm-commits mailing list