From a135940cf5184c7af0b2ca1a7c72f58a45dc4f3c Mon Sep 17 00:00:00 2001 From: ccrause Date: Sun, 14 Aug 2022 19:49:26 +0200 Subject: [PATCH] Mark .noinit section with nobits flag. --- compiler/aasmtai.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/aasmtai.pas b/compiler/aasmtai.pas index fdd83d269b..682e825f39 100644 --- a/compiler/aasmtai.pas +++ b/compiler/aasmtai.pas @@ -1339,6 +1339,9 @@ implementation TObjData.sectiontype2progbitsandflags(sectype,secprogbits,secflags); name:=stringdup(Aname); sec:=nil; + // .noinit section should be marked with the nobits flag + if (sectype=sec_user) and (Aname='.noinit') then + secprogbits:=SPB_NOBITS; end; constructor tai_section.Create_proc(Asectype:TAsmSectiontype;