[PATCH] D142453: [AMDGPU][MC] Generate relative relocations for allocatable (more particularly, eh_frame) sections

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 10:08:48 PST 2023


scott.linder accepted this revision.
scott.linder added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp:73
   default: break;
   case FK_PCRel_4:
     return ELF::R_AMDGPU_REL32;
----------------
I'm not certain I understand why there are some fixup kinds which encode their PCRelative-ness (e.g. FK_PCRel_4) and some which don't (e.g. FK_Data_4), and yet there is also a separate channel where a fixup that is not intrinsically PCRelative can be tagged as `FixupKindFlags::FKF_IsPCRel` (here the value of `IsPCRel`).

The representation seems to be decades old, so I will just take it on faith that it makes sense, and in light of it the change LGTM!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142453



More information about the llvm-commits mailing list