[PATCH] D71649: [PPC32] Emit R_PPC_PLTREL24 for calls to dso_local ifunc

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 10:51:21 PST 2019


sfertile accepted this revision as: sfertile.
sfertile added a comment.
This revision is now accepted and ready to land.

In D71649#1792275 <https://reviews.llvm.org/D71649#1792275>, @MaskRay wrote:

> 🤡🤡🤡(Any chance this is reviewed before I watch star wars? (I felt that if I did not say, due to vacation schedules, this might took a lot longer..))


Yep, sorry for taking so long. It seems the fact that upgrading a function to an ifunc isn't always safe for the 32-bit PowerPC ABI is soemthing we just have to live with. I am good with this patch as is, with 2 minor comments:

1. Is it possible to diagnose when a call to an ifunc uses  R_PPC_LOCAL24PC or R_PPC_REL24  but should have used a R_PPC_PLTREL instead? It would be really nice to issue a Error with a descriptive diagnostic at link time for this.

2. We should consider not marking ifunc as dso_local when generating the IR. At least for ppc32, but I think conceptually it might make sense in general.

P.S. Hope you enjoy Star Wars!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71649





More information about the llvm-commits mailing list