[PATCH] D101724: [lld-macho] De-templatize mach_header operations

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 10:01:18 PDT 2021


int3 added inline comments.


================
Comment at: lld/MachO/SyntheticSections.cpp:130
     }
   }
 
----------------
thakis wrote:
> We should probably `memset(buf + sizeof(mac_header), target->headerSize - sizeof(mac_header), 0)` here to make sure that the `reserved` field is set to some deterministic data here. (Or is the output pre-zeroed? Probably not?)
There are several other places in the code that assume the output is pre-zeroed... and in practice that seems to work... though I'm not sure why 🤔


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101724



More information about the llvm-commits mailing list