https://github.com/rui314/mold/issues/1447 https://github.com/rui314/mold/commit/83dd35397955bd179723ce31d52fc30836a65eed From 83dd35397955bd179723ce31d52fc30836a65eed Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 1 May 2025 09:33:52 +0900 Subject: [PATCH] Prevent oscillation when computing the size of the phdr Fixes https://github.com/rui314/mold/issues/1447 --- src/passes.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/passes.cc b/src/passes.cc index a2f1ed3347..5845dd6a19 100644 --- a/src/passes.cc +++ b/src/passes.cc @@ -2780,7 +2780,7 @@ i64 set_osec_offsets(Context &ctx) { if (ctx.phdr) { i64 sz = ctx.phdr->shdr.sh_size; ctx.phdr->update_shdr(ctx); - if (sz != ctx.phdr->shdr.sh_size) + if (sz < ctx.phdr->shdr.sh_size) continue; }