[PATCH] D118903: [lld-macho] Have relocation address included in range-check error message

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 3 06:59:29 PST 2022


int3 added inline comments.


================
Comment at: lld/MachO/SyntheticSections.h:596-597
 
 struct InStruct {
+  const uint8_t *bufferStart = nullptr;
   MachHeaderSection *header = nullptr;
----------------
So in LLD-ELF, `bufferStart` is a member of the `Out` struct, while the synthetic sections are part of the `InStruct`. We don't have an `Out` struct at the moment, but IMO our `InStruct` should be renamed to `Out`, for unlike LLD-ELF, our synthetic sections are OutputSections.

Alternatively, we could put all the synthetic sections into a `Synth` struct, and leave just `bufferStart` in the `Out` struct... but I'm not sure what else would go into our `Out`. Maybe `bufferStart` could just be a global?

anyway we can figure the exact renaming separately from this diff


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118903



More information about the llvm-commits mailing list