[PATCH] D46204: [PPC64] V2 abi: Emit plt call stubs to the text section rather then the plt section.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 13:19:22 PDT 2018


sfertile added a comment.

A bit more info here since the fact the call to `_ZNKSt6locale2id5_M_idEv` is a recursive call makes the situation a bit more muddy. I tested this with an older gcc version (5.4.0) and a newer version (7.3.1 from advanced toolchain 11). The newer compiler will emit a nop after a recursive call if the function is interposable, while the older compiler skips the nop. The linkers from the older toolchain  (gold and bfd from binutils 2.26)  both use plt stubs for the recursive call, and will rewrite the following nop to a toc-restore if the nop is there. I think lld behavior to emit a fatal error when trying to link `_ZNKSt6locale2id5_M_idEv` into a shared object is the correct one.


Repository:
  rL LLVM

https://reviews.llvm.org/D46204





More information about the llvm-commits mailing list