[PATCH] D61698: [COFF] Store alignment in log2 form, NFC

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 13:54:00 PDT 2019


aganea added inline comments.


================
Comment at: lld/COFF/Chunks.h:47-48
 
+// The log base 2 of the largest section alignment, which is log2(8192), or 13.
+enum : unsigned { Log2MaxSectionAlignment = 13 };
+
----------------
ruiu wrote:
> Is this enforced by the file format?
Yes there's a hard limit in the [[ https://github.com/llvm/llvm-project/blob/cc525c97b7df198095124ee1fb68219e5a9189a5/llvm/include/llvm/BinaryFormat/COFF.h#L313 | SectionCharacteristics ]], see [[ https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format | PE Format ]]


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61698





More information about the llvm-commits mailing list