[PATCH] D85618: [ELF] Move the outSecOff addend from relocAlloc/relocNonAlloc/... to InputSectionBase::relocate

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 00:59:24 PDT 2020


psmith added a comment.

Simplification looks good to me. I'm not sure about the test changes as I would have expected the change to be NFC. If these are test improvements it will be worth altering separately.

The comment in InputSections.h says

  // Each section knows how to relocate itself. These functions apply
  // relocations, assuming that Buf points to this section's copy in
  // the mmap'ed output buffer.
  template <class ELFT> void relocate(uint8_t *buf, uint8_t *bufEnd);
  void relocateAlloc(uint8_t *buf, uint8_t *bufEnd);

May be worth changing "Buf points to this section's copy in the mmap'ed output buffer" to "Buf points to the start of the copy of the InputSection's data in the mmap'ed output buffer."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85618



More information about the llvm-commits mailing list