[PATCH] D27201: [ELF] - Do not create 4gb output when -obinary -Ttext and -omagic used together. (variant 2)

Ed Maste via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 06:44:16 PST 2016


emaste added inline comments.


================
Comment at: ELF/Writer.cpp:1239
   for (const Phdr &P : Phdrs)
-    if (P.H.p_type == PT_LOAD)
+    if (P.H.p_type == PT_LOAD && P.First)
       P.First->PageAlign = true;
----------------
It seems a tad confusing. Could we avoid adding an empty PT_LOAD? To me, having the extra complexity in createPhdrs instead of here would make the overall operation more clear.


================
Comment at: test/ELF/oformat-binary-ttext.s:7-9
+# BIN:      0000000 90 00 00 00 00 00 00 00
+# BIN-NEXT: 0000010
+# BIN-NOT:  0000020
----------------
If there's only one, use regular `CHECK`, `CHECK-NEXT`?


https://reviews.llvm.org/D27201





More information about the llvm-commits mailing list