[PATCH] D23063: [ELF] - Linkerscript: implemented SUBALIGN() command.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 15:34:23 PDT 2016

ruiu added a comment.

I think that it is better to overwrite each input section's Alignment member variable.

Comment at: ELF/LinkerScript.h:29-30
@@ -28,3 +28,4 @@
-typedef std::function<uint64_t(uint64_t)> Expr;
+typedef std::function<uint64_t()> DotExpr;
+typedef std::function<uint64_t(DotExpr)> Expr;
Hmm, this seems too complicated.

Comment at: ELF/LinkerScript.h:85
@@ -83,2 +84,3 @@
   Expr AlignExpr;
+  Expr SubAlignExpr;
   std::vector<std::unique_ptr<BaseCommand>> Commands;
I'd treat "subalign" as one word, so I'd name `SubalignExpr`.


More information about the llvm-commits mailing list