فهرست منبع

added group directive, so that the .data, .rodata and .bss sections go to the same segment

git-svn-id: branches/i8086@23754 -
nickysn 12 سال پیش
والد
کامیت
c467035a1c
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      compiler/x86/agx86nsm.pas

+ 9 - 0
compiler/x86/agx86nsm.pas

@@ -1048,6 +1048,15 @@ interface
           WriteSmartExternals;
           WriteSmartExternals;
           FreeExternChainList;
           FreeExternChainList;
         end;
         end;
+{$ifdef i8086}
+      { NASM complains if you put a missing section in the GROUP directive, so }
+      { we add empty declarations to make sure they exist, even if empty }
+      AsmWriteLn('SECTION .rodata');
+      AsmWriteLn('SECTION .data');
+      AsmWriteLn('SECTION .bss');
+      { group these sections in the same segment }
+      AsmWriteLn('GROUP dgroup rodata data bss');
+{$endif i8086}
 {$ifdef EXTDEBUG}
 {$ifdef EXTDEBUG}
       if current_module.mainsource<>'' then
       if current_module.mainsource<>'' then
        comment(v_info,'Done writing nasm-styled assembler output for '+current_module.mainsource);
        comment(v_info,'Done writing nasm-styled assembler output for '+current_module.mainsource);