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

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 20 11:03:53 PST 2024


MaskRay wrote:

> I've checked over the implementation with binutils. Out of interest are you planning on implementing all of fdpic or just enough to get assembler/linker support working?

Yes, I plan to implement the codegen part to help me understand FDPIC better and the codegen part of LLVM...
(I need to study PPC ELFv1 function descriptors.)

> If you are there are some other GNU options that may be useful to look at as possible intermediate steps. In particular -mno-pic-data-is-text-relative [gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-mpic-data-is-text-relative](https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-mpic-data-is-text-relative) this uses a single static base for the GOT which is sufficient for position independent executables but no shared library support.

Thanks for the pointers. Yes, it looks like ARM added `-mpic-data-is-text-relative` first then s390x ported it.
The option is similar to `-msep-data` (m68k/bfin) and probably used for MMU-less systems without dynamic linking support. I have work-in-progress notes at https://maskray.me/blog/2024-02-20-mmu-less-systems-and-fdpic

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


More information about the llvm-branch-commits mailing list