Browse Source

* declare the .bss sections with class=bss, so wlink treats them as bss sections and leaves them out of the executable

git-svn-id: branches/i8086@24064 -
nickysn 12 years ago
parent
commit
324b4a8a0a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      compiler/x86/agx86nsm.pas

+ 6 - 1
compiler/x86/agx86nsm.pas

@@ -507,6 +507,11 @@ interface
             AsmWrite('.');
             AsmWrite(aname);
           end;
+{$ifdef i8086}
+        { WLINK requires this in order to leave the BSS section out of the executable }
+        if atype = sec_bss then
+           AsmWrite(' class=bss');
+{$endif i8086}
         AsmLn;
         LasTSecType:=atype;
       end;
@@ -1064,7 +1069,7 @@ interface
       { we add empty declarations to make sure they exist, even if empty }
       AsmWriteLn('SECTION .rodata');
       AsmWriteLn('SECTION .data');
-      AsmWriteLn('SECTION .bss');
+      AsmWriteLn('SECTION .bss class=bss');
       { group these sections in the same segment }
       AsmWriteLn('GROUP dgroup rodata data bss');
 {$endif i8086}