Selaa lähdekoodia

* capitalize omf segment class names, as that's how other 16-bit compilers write them

git-svn-id: trunk@31371 -
nickysn 10 vuotta sitten
vanhempi
commit
5dc42404cf
3 muutettua tiedostoa jossa 20 lisäystä ja 20 poistoa
  1. 6 6
      compiler/ogomf.pas
  2. 10 10
      compiler/x86/agx86nsm.pas
  3. 4 4
      rtl/msdos/prt0comn.asm

+ 6 - 6
compiler/ogomf.pas

@@ -385,28 +385,28 @@ implementation
         FUse:=suUse16;
         FUse:=suUse16;
         if oso_executable in Aoptions then
         if oso_executable in Aoptions then
           begin
           begin
-            FClassName:='code';
+            FClassName:='CODE';
             dgroup:=(current_settings.x86memorymodel=mm_tiny);
             dgroup:=(current_settings.x86memorymodel=mm_tiny);
           end
           end
         else if Aname='stack' then
         else if Aname='stack' then
           begin
           begin
-            FClassName:='stack';
+            FClassName:='STACK';
             FCombination:=scStack;
             FCombination:=scStack;
             dgroup:=current_settings.x86memorymodel in (x86_near_data_models-[mm_tiny]);
             dgroup:=current_settings.x86memorymodel in (x86_near_data_models-[mm_tiny]);
           end
           end
         else if Aname='heap' then
         else if Aname='heap' then
           begin
           begin
-            FClassName:='heap';
+            FClassName:='HEAP';
             dgroup:=current_settings.x86memorymodel in x86_near_data_models;
             dgroup:=current_settings.x86memorymodel in x86_near_data_models;
           end
           end
         else if Aname='bss' then
         else if Aname='bss' then
           begin
           begin
-            FClassName:='bss';
+            FClassName:='BSS';
             dgroup:=true;
             dgroup:=true;
           end
           end
         else if Aname='data' then
         else if Aname='data' then
           begin
           begin
-            FClassName:='data';
+            FClassName:='DATA';
             dgroup:=true;
             dgroup:=true;
           end
           end
         else if (Aname='debug_frame') or
         else if (Aname='debug_frame') or
@@ -420,7 +420,7 @@ implementation
           end
           end
         else
         else
           begin
           begin
-            FClassName:='data';
+            FClassName:='DATA';
             dgroup:=true;
             dgroup:=true;
           end;
           end;
         if dgroup then
         if dgroup then

+ 10 - 10
compiler/x86/agx86nsm.pas

@@ -268,7 +268,7 @@ interface
         if current_settings.x86memorymodel in x86_far_code_models then
         if current_settings.x86memorymodel in x86_far_code_models then
           begin
           begin
             if cs_huge_code in current_settings.moduleswitches then
             if cs_huge_code in current_settings.moduleswitches then
-              result:=aname + '_TEXT use16 class=code'
+              result:=aname + '_TEXT use16 class=CODE'
             else
             else
               result:=current_module.modulename^ + '_TEXT';
               result:=current_module.modulename^ + '_TEXT';
           end
           end
@@ -533,11 +533,11 @@ interface
         else if (target_info.system=system_i8086_msdos) and
         else if (target_info.system=system_i8086_msdos) and
                 (atype=sec_stack) and
                 (atype=sec_stack) and
                 (current_settings.x86memorymodel in x86_far_data_models) then
                 (current_settings.x86memorymodel in x86_far_data_models) then
-          AsmWrite('stack stack class=stack align=16')
+          AsmWrite('stack stack class=STACK align=16')
         else if (target_info.system=system_i8086_msdos) and
         else if (target_info.system=system_i8086_msdos) and
                 (atype=sec_heap) and
                 (atype=sec_heap) and
                 (current_settings.x86memorymodel in x86_far_data_models) then
                 (current_settings.x86memorymodel in x86_far_data_models) then
-          AsmWrite('heap class=heap align=16')
+          AsmWrite('heap class=HEAP align=16')
 {$endif i8086}
 {$endif i8086}
         else
         else
           AsmWrite(secnames[atype]);
           AsmWrite(secnames[atype]);
@@ -1078,19 +1078,19 @@ interface
       end;
       end;
 
 
       if not (cs_huge_code in current_settings.moduleswitches) then
       if not (cs_huge_code in current_settings.moduleswitches) then
-        AsmWriteLn('SECTION ' + CodeSectionName(current_module.modulename^) + ' use16 class=code');
+        AsmWriteLn('SECTION ' + CodeSectionName(current_module.modulename^) + ' use16 class=CODE');
       { NASM complains if you put a missing section in the GROUP directive, so }
       { 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 }
       { we add empty declarations to make sure they exist, even if empty }
-      AsmWriteLn('SECTION .rodata class=data align=2');
-      AsmWriteLn('SECTION .data class=data align=2');
-      AsmWriteLn('SECTION .fpc class=data');
+      AsmWriteLn('SECTION .rodata class=DATA align=2');
+      AsmWriteLn('SECTION .data class=DATA align=2');
+      AsmWriteLn('SECTION .fpc class=DATA');
       { WLINK requires class=bss in order to leave the BSS section out of the executable }
       { WLINK requires class=bss in order to leave the BSS section out of the executable }
-      AsmWriteLn('SECTION .bss class=bss align=2');
+      AsmWriteLn('SECTION .bss class=BSS align=2');
       if (current_settings.x86memorymodel<>mm_tiny) and
       if (current_settings.x86memorymodel<>mm_tiny) and
          (current_settings.x86memorymodel in x86_near_data_models) then
          (current_settings.x86memorymodel in x86_near_data_models) then
-        AsmWriteLn('SECTION stack stack class=stack align=16');
+        AsmWriteLn('SECTION stack stack class=STACK align=16');
       if current_settings.x86memorymodel in x86_near_data_models then
       if current_settings.x86memorymodel in x86_near_data_models then
-        AsmWriteLn('SECTION heap class=heap align=16');
+        AsmWriteLn('SECTION heap class=HEAP align=16');
       { group these sections in the same segment }
       { group these sections in the same segment }
       if current_settings.x86memorymodel=mm_tiny then
       if current_settings.x86memorymodel=mm_tiny then
         AsmWriteLn('GROUP DGROUP text rodata data fpc bss heap')
         AsmWriteLn('GROUP DGROUP text rodata data fpc bss heap')

+ 4 - 4
rtl/msdos/prt0comn.asm

@@ -36,7 +36,7 @@
 
 
         cpu 8086
         cpu 8086
 
 
-        segment text use16 class=code
+        segment text use16 class=CODE
 
 
         extern PASCALMAIN
         extern PASCALMAIN
         extern __fpc_PrefixSeg
         extern __fpc_PrefixSeg
@@ -489,7 +489,7 @@ FPC_CHECK_NULLAREA:
     %endif
     %endif
 %endif
 %endif
 
 
-        segment data class=data align=2
+        segment data class=DATA align=2
 %ifdef __NEAR_DATA__
 %ifdef __NEAR_DATA__
 mem_realloc_err_msg:
 mem_realloc_err_msg:
         db 'Memory allocation error', 13, 10, '$'
         db 'Memory allocation error', 13, 10, '$'
@@ -500,7 +500,7 @@ not_enough_mem_msg:
         ; module, containing the heap segment doesn't get smartlinked away
         ; module, containing the heap segment doesn't get smartlinked away
         dw ___heap
         dw ___heap
 
 
-        segment bss class=bss align=2
+        segment bss class=BSS align=2
 
 
 %ifndef __TINY__
 %ifndef __TINY__
         segment _NULL align=16 class=BEGDATA
         segment _NULL align=16 class=BEGDATA
@@ -513,7 +513,7 @@ __nullarea:
         dw 0
         dw 0
 
 
     %ifdef __NEAR_DATA__
     %ifdef __NEAR_DATA__
-        segment stack stack class=stack
+        segment stack stack class=STACK
     %else
     %else
         segment data
         segment data
         ; add reference to the beginning of stack, so the object module,
         ; add reference to the beginning of stack, so the object module,