[PATCH] D112386: [ELF][X86] Support R_X86_64_PLTOFF64

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 24 12:07:31 PDT 2021


MaskRay created this revision.
MaskRay added reviewers: arichardson, jhenderson, peter.smith.
Herald added subscribers: ormris, pengfei, s.egerton, steven_wu, simoncook, hiraditya, inglorion, emaste.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

For a function call, GCC `-mcmodel=large` generates an assembly modifier which
leads to an R_X86_64_PLTOFF64 relocation. In real world,
http://git.ageinghacker.net/jitter (used by GNU poke) uses `-mcmodel=large`.

R_X86_64_PLTOFF64's formula is (if preemptible) L - GOT + A or (if non-preemptible) S - GOT + A.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112386

Files:
  lld/ELF/Arch/X86_64.cpp
  lld/ELF/InputSection.cpp
  lld/ELF/Relocations.cpp
  lld/ELF/Relocations.h
  lld/test/ELF/x86-64-reloc-pltoff64.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112386.381792.patch
Type: text/x-patch
Size: 5150 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211024/eaf692f8/attachment.bin>


More information about the llvm-commits mailing list