[all-commits] [llvm/llvm-project] fb9c5c: [lld][AMDGPU] Handle R_AMDGPU_REL16 relocation.

abidh via All-commits all-commits at lists.llvm.org
Tue Jul 13 12:42:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb9c5c3dce27b352534641dbb6e3cb8c05da7bc9
      https://github.com/llvm/llvm-project/commit/fb9c5c3dce27b352534641dbb6e3cb8c05da7bc9
  Author: Hafiz Abid Qadeer <abidh at codesourcery.com>
  Date:   2021-07-13 (Tue, 13 Jul 2021)

  Changed paths:
    M lld/ELF/Arch/AMDGPU.cpp
    A lld/test/ELF/amdgpu-relocs2.s

  Log Message:
  -----------
  [lld][AMDGPU] Handle R_AMDGPU_REL16 relocation.

This patch is a followup patch to https://reviews.llvm.org/D105760 which adds this relocation. This handles the relocation in lld.

The s_branch family of instruction does the following:
PC = PC + signext(simm * 4) + 4

so we we do the opposite on the target address before writing it in the instruction stream.

Reviewed By: MaskRay

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




More information about the All-commits mailing list