grimar added inline comments. ================ Comment at: ELF/LinkerScript.cpp:384 @@ -382,2 +383,3 @@ + Phdrs[Id].H.p_flags |= toPhdrFlags(Sec->getFlags()); Phdrs[Id].H.p_flags |= toPhdrFlags(Sec->getFlags()); } ---------------- Is this correct ? https://reviews.llvm.org/D22564