[PATCH] D79625: [PowerPC] Extend .reloc directive on PowerPC

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 21:16:26 PDT 2020


stefanp added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp:390
+    case PPC::fixup_ppc_linker_opt:
+      Type = ELF::R_PPC64_PCREL_OPT;
+      break;
----------------
stefanp wrote:
> MaskRay wrote:
> > Can we just use FirstLiteralRelocationKind+R_PPC64_PCREL_OPT and not define `fixup_ppc_linker_opt`?
> Ok, I'll get rid of that the fixup name.
> I'll update the patch and  you can see if that is what you are looking for.
> 
> I do have a question related to this though... In the future I will want to generate fixups of this type. Usually I would do that like this:
> ```
> MCFixup::create(Offset, Expr, (MCFixupKind)PPC::fixup_ppc_linker_opt, Loc);
> ```
> If I completely remove this naming would I be doing this instead?
> ```
> MCFixup::create(Offset, Expr, FirstLiteralRelocationKind, Loc);
> ```
> Is that the right way to do it?
Sorry!
I think I just figured out what you meant... 
Let me update the patch again.


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

https://reviews.llvm.org/D79625





More information about the llvm-commits mailing list