[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
Fri Apr 13 16:04:34 PDT 2018


sfertile created this revision.
sfertile added reviewers: syzaara, ruiu, rdhindsa.
Herald added subscribers: kbarton, arichardson, nemanjai, emaste.
Herald added a reviewer: espindola.

This patch adds  support for  .glink resolver stubs from the example implementation in the V2 abi.  (Section 4.2.5.3. Procedure Linkage Table)

The .glink section has a common resolver entry point  '__glink_PLTresolve' which sets up the environment and then calls a resolver function supplied by the dynamic linker. Following `__glink_PLTresolve` is a set of branches, one for each function needing lazy resolution, which branch to the common resolver entry point.

Communicating to the dynamic linker where the lazy resolver stubs start is done with the PPC64_GLINK dynamic tag which has to point to the address 32 bytes before the first lazy symbol resolver stub.

In the V2 abi the .glink section is supposed to be merged into the end of the text section, this will be done in a follow up patch.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D45642

Files:
  ELF/SyntheticSections.cpp
  ELF/SyntheticSections.h
  ELF/Writer.cpp
  test/ELF/ppc64le-glink.s
  test/ELF/ppc64le-plt-stub.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45642.142475.patch
Type: text/x-patch
Size: 10663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180413/f18e70a0/attachment.bin>


More information about the llvm-commits mailing list