[PATCH] D45642: [PPC64] V2 abi: Add glink section for lazy symbol resolution.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 16 12:49:19 PDT 2018


sfertile added a comment.

In https://reviews.llvm.org/D45642#1068980, @espindola wrote:

> This is a plt by another name, no?
>
> Do you know why it is defined to have  another name?


I'm not sure what you mean by 'plt' here. In this abi the `.plt` section is just the array of addresses of external functions that the dynamic linker fills out at runtime.  The `.glink` section holds the lazy resolution stubs which will setup the environment for the dynamic linker to do so. Then there are also stubs for calling the external functions by loading their address out of the `.plt`. Am I right to assume by 'plt' you mean a combination of lazy resolver and the call stub?

In https://reviews.llvm.org/D45642#1068980, @espindola wrote:

> Could it be implemented as a plt section and use the WritePltHeader/writePlt target hooks?


This section is actually supposed to get merged into the end of the .text section (I'm planning to work on that as a follow on though) . Currently we are writing the call stubs in the `.plt` section, but we will have to fix that by writing the call stubs directly into the `.text` section and writing what we currently emit to the `.got.plt` section to the `.plt` section.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D45642





More information about the llvm-commits mailing list