Browse Source

* use the 'order' wlink directive to specify the segment order, instead of using
'option dosseg'. This allows us more flexibility in setting up the segment
order the way we like.

git-svn-id: trunk@27958 -

nickysn 11 years ago
parent
commit
49f93b4464
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/systems/t_msdos.pas

+ 4 - 1
compiler/systems/t_msdos.pas

@@ -277,7 +277,10 @@ begin
     LinkRes.Add('format dos com')
     LinkRes.Add('format dos com')
   else
   else
     LinkRes.Add('format dos');
     LinkRes.Add('format dos');
-  LinkRes.Add('option dosseg');
+  if current_settings.x86memorymodel=mm_tiny then
+    LinkRes.Add('order clname CODE clname DATA clname BSS')
+  else
+    LinkRes.Add('order clname CODE clname BEGDATA segment _NULL segment _AFTERNULL clname DATA clname BSS clname STACK');
   if (cs_link_map in current_settings.globalswitches) then
   if (cs_link_map in current_settings.globalswitches) then
     LinkRes.Add('option map='+maybequoted(ChangeFileExt(current_module.exefilename,'.map')));
     LinkRes.Add('option map='+maybequoted(ChangeFileExt(current_module.exefilename,'.map')));
   LinkRes.Add('name ' + maybequoted(current_module.exefilename));
   LinkRes.Add('name ' + maybequoted(current_module.exefilename));