[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:46:10 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;
----------------
emaste wrote:
> 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.
Oh, now I understand, and will comment in D27200. 



https://reviews.llvm.org/D27201





More information about the llvm-commits mailing list