[PATCH] D70570: [PowerPC] Only use PLT annotations if using PIC relocation model
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 10:18:44 PST 2019
sfertile added a comment.
In D70570#1758956 <https://reviews.llvm.org/D70570#1758956>, @Bdragon28 wrote:
> This doesn't seem quite sufficient for FreeBSD kernel modules. It's emitting R_PPC_REL24 instead of R_PPC_ADDR16_HA/R_PPC_ADDR16_LO pairs for stuff like memset and memcpy,
> which are unusable because we're running modules in KVA and the kernel text in the 32 bit DMAP. Still need to figure out why these are being emitted this way when using freestanding.
With those relocations, are you building up the address of memset/memcpy directly and performing an indirect call?
eg, something along the lines of:
addis r12, r0, memset at ha
addi r12, r12, memset at l
mtctr r12
bctrl
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70570/new/
https://reviews.llvm.org/D70570
More information about the llvm-commits
mailing list