From e076414f91c8d8b1a1150accc6cb9c990352eeee Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 4 Jun 2021 15:33:01 +0900 Subject: [PATCH] Do not unnecessarily page-align some segments --- output_chunks.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/output_chunks.cc b/output_chunks.cc index e187312b..612a7266 100644 --- a/output_chunks.cc +++ b/output_chunks.cc @@ -163,6 +163,9 @@ std::vector> create_phdr(Context &ctx) { } // Create PT_LOAD segments. + for (OutputChunk *chunk : ctx.chunks) + chunk->new_page = false; + for (i64 i = 0, end = ctx.chunks.size(); i < end;) { OutputChunk *first = ctx.chunks[i++]; if (!(first->shdr.sh_flags & SHF_ALLOC))