[PATCH] D54917: [ELF] Comment about retpoline IPLT in getPltVA

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 27 13:18:51 PST 2018


MaskRay added a comment.

In D54917#1310372 <https://reviews.llvm.org/D54917#1310372>, @ruiu wrote:

> Then maybe the function is currently at a wrong place?


`InputSection::writeTo` calls `PltSection::writeTo`. This may happen twice, one for normal PLT and the other for IPLT
`PltSection::writeTo` calls `Target->writePltHeader` and `Target->writePlt`. The two methods are overriden by `Arch/*.cpp` targets.
`X86_64<ELFT>::writePlt` (and some other targets) calls `Target->getPltEntryOffset`.

The bit of information (whether it is PLT or IPLT) is lost when `PltSection::writeTo` calls into `TargetInfo` methods. I am confusing about a better place to place the `PltHeaderSize` information.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D54917





More information about the llvm-commits mailing list