[llvm-branch-commits] [ARM, MC] Support FDPIC relocations (PR #82187)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Feb 18 11:27:53 PST 2024


https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/82187

Linux kernel fs/binfmt_elf_fdpic.c supports FDPIC for MMU-less systems.
GCC/binutils/qemu support FDPIC ABI for ARM
(https://github.com/mickael-guene/fdpic_doc).
_ARM FDPIC Toolchain and ABI_ provides a summary.

This patch implements FDPIC relocations to the integrated assembler.
There are 6 static relocations and 2 dynamic relocations, with
R_ARM_FUNCDESC as both static and dynamic.

gas requires `--fdpic` to assemble data relocations like `.word f(FUNCDESC)`.
This patch adds `MCTargetOptions::FDPIC` and reports an error if FDPIC
is not set.





More information about the llvm-branch-commits mailing list