[PATCH] D71518: [ELF] Delete relOff from TargetInfo::writePLT

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 14 18:13:03 PST 2019


MaskRay created this revision.
MaskRay added reviewers: grimar, peter.smith, ruiu.
Herald added subscribers: llvm-commits, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, jsji, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, fedor.sergeev, kbarton, arichardson, nemanjai, sdardis, emaste, jyknight.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
MaskRay added a child revision: D71519: [ELF] Add IpltSection.

This change is NFC for non-EM_386.

For X86::writePlt, relOff can be computed from `index` easily.

Both in.plt and in.iplt entries are written by writePLT.
For in.iplt, `index` will now be different. This will affect the
instruction `push reloc_offset`.

Fortunately, the `pushl $reloc_offset; jmpl $plt_header` code sequence
is only used by a lazy binding PLT. IFUNC is eagerly resolved so
reloc_offset does not matter.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71518

Files:
  lld/ELF/Arch/AArch64.cpp
  lld/ELF/Arch/ARM.cpp
  lld/ELF/Arch/Hexagon.cpp
  lld/ELF/Arch/Mips.cpp
  lld/ELF/Arch/PPC.cpp
  lld/ELF/Arch/PPC64.cpp
  lld/ELF/Arch/RISCV.cpp
  lld/ELF/Arch/SPARCV9.cpp
  lld/ELF/Arch/X86.cpp
  lld/ELF/Arch/X86_64.cpp
  lld/ELF/SyntheticSections.cpp
  lld/ELF/Target.h
  lld/test/ELF/gnu-ifunc-i386.s
  lld/test/ELF/gnu-ifunc-plt-i386.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71518.233949.patch
Type: text/x-patch
Size: 17893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191215/65c15ee7/attachment-0001.bin>


More information about the llvm-commits mailing list