[all-commits] [llvm/llvm-project] b39779: [JITLink][ELF] Implement R_X86_64_PLT32 relocations

Stefan Gränitz via All-commits all-commits at lists.llvm.org
Tue Nov 3 04:08:57 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b397795f1a2f9e25669fe030dc3836f35e2e725e
      https://github.com/llvm/llvm-project/commit/b397795f1a2f9e25669fe030dc3836f35e2e725e
  Author: Stefan Gränitz <stefan.graenitz at gmail.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
    M llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_relocations.s

  Log Message:
  -----------
  [JITLink][ELF] Implement R_X86_64_PLT32 relocations

Basic implementation for call and jmp branches with 32 bit offset. Branches to local targets produce
Branch32 edges that are resolved like a regular PCRel32 relocations. Branches to external (undefined)
targets produce Branch32ToStub edges and go through a PLT entry by default. If the target happens to
get resolved within the 32 bit range from the callsite, the edge is relaxed during post-allocation
optimization. There is a test for each of these cases.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D90331




More information about the All-commits mailing list