[PATCH] D66274: [ELF][Hexagon] Replace R_HEXAGON_GOT with R_GOTPLT

Sid Manning via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 15:41:54 PDT 2019


sidneym added inline comments.


================
Comment at: ELF/InputSection.cpp:676
-  case R_HEXAGON_GOT:
-    return sym.getGotVA() - in.gotPlt->getVA();
   case R_MIPS_GOTREL:
----------------
sidneym wrote:
> sidneym wrote:
> > Removing this will produce unexpected output.  GOT is the address in the GOT (G).  GOTREL is the difference between the location and table (S+A - GOT)
> Ah, looking at the code more carefully I think this ok.  I was reading this as GOTPLTREL not GOTPLT.  Let me try to look back and see why this wasn't done in the first place.
R_HEXAGON_GOT was added before R_GOTPLT.  I think it's ok to use R_GOTPLT.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D66274





More information about the llvm-commits mailing list