[PATCH] D62464: [PPC32] Improve 32-bit PowerPC

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 00:38:39 PDT 2019


ruiu added inline comments.


================
Comment at: ELF/Arch/PPC.cpp:32
+  uint32_t getThunkSectionSpacing() const override;
+  bool inBranchRange(RelType Type, uint64_t Src, uint64_t Dst) const override;
   void relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const override;
----------------
To make it clear that we write a PLT section in a different way, I'd define writePlt and writePltHeader which just call llvm_unreachable().


================
Comment at: ELF/Target.h:45
                         unsigned RelOff) const {}
+  virtual void writePPC32GlinkSection(uint8_t *Buf, size_t NumEntries) const {}
   virtual void addPltHeaderSymbols(InputSection &IS) const {}
----------------
This function doesn't have to be in this class because no dynamic dispatching is necessary. Only PPC32 implements this as its name implies. I'd make this a non-member function.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D62464





More information about the llvm-commits mailing list