[PATCH] D88064: [lld-macho] handle option -headerpad_max_install_names

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 20:44:54 PDT 2020


gkm added inline comments.


================
Comment at: lld/MachO/Writer.cpp:371
+    size_t installNamesPadSize =
+        (dylibCount + ((config->outputType == MH_DYLIB) ? 1 : 0)) * 1024;
+    if (config->headerPad < installNamesPadSize)
----------------
int3 wrote:
> nit: make 1024 a named constant
> 
> nit 2: I assume we are checking for `MH_DYLIB` here because the `LC_DYLIB_ID` command also contains an install name. Would be good to have a comment.
> 
> Also -- don't we need to allocate space for the `LC_REEXPORT_DYLIB` commands as well?
Yes to all.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88064



More information about the llvm-commits mailing list