Преглед на файлове

Mark .noinit section with nobits flag.

ccrause преди 3 години
родител
ревизия
a135940cf5
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      compiler/aasmtai.pas

+ 3 - 0
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;