[PATCH] D28911: [LinkerScript] Implement `MEMORY` command

Meador Inge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 18:15:09 PST 2017


meadori added a comment.

I will fix the remaining nits and double-check with gold\ld.  Thanks for all the review!



================
Comment at: ELF/LinkerScript.cpp:551
+  // Otherwise, no suitable region was found.
+  if ((Sec->Flags & SHF_ALLOC) != 0)
+    error("no memory region specified for section '" + Sec->Name + "'");
----------------
ruiu wrote:
> You can remove `!= 0` because any `if (X)` is equivalent to `if ((X) != 0)`.
Will fix.


================
Comment at: ELF/LinkerScript.h:199
+  uint64_t Length;
+  uint64_t Index;
+  uint32_t Flags;
----------------
ruiu wrote:
> I found that `Index` is a bit confusing. Maybe `Offset`?
SGTM.  I will change it.


https://reviews.llvm.org/D28911





More information about the llvm-commits mailing list