瀏覽代碼

* fixed crash with writing of the linker script

peter 24 年之前
父節點
當前提交
f44c50aafb
共有 2 個文件被更改,包括 22 次插入17 次删除
  1. 4 2
      compiler/script.pas
  2. 18 15
      compiler/targets/t_go32v2.pas

+ 4 - 2
compiler/script.pas

@@ -58,7 +58,6 @@ type
 
 var
   AsmRes : TAsmScript;
-  LinkRes : TLinkRes;
 
 
 implementation
@@ -238,7 +237,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.9  2001-04-18 22:01:58  peter
+  Revision 1.10  2001-07-10 21:01:35  peter
+    * fixed crash with writing of the linker script
+
+  Revision 1.9  2001/04/18 22:01:58  peter
     * registration of targets and assemblers
 
   Revision 1.8  2001/04/13 01:22:14  peter

+ 18 - 15
compiler/targets/t_go32v2.pas

@@ -166,20 +166,6 @@ begin
   ScriptRes.Add('OUTPUT_FORMAT("coff-go32-exe")');
   ScriptRes.Add('ENTRY(start)');
 
-  { Write path to search libraries }
-  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
-  while assigned(HPath) do
-   begin
-     LinkRes.Add('SEARCH_PATH("'+GetShortName(HPath.Str)+'")');
-     HPath:=TStringListItem(HPath.Next);
-   end;
-  HPath:=TStringListItem(LibrarySearchPath.First);
-  while assigned(HPath) do
-   begin
-     LinkRes.Add('SEARCH_PATH("'+GetShortName(HPath.Str)+'")');
-     HPath:=TStringListItem(HPath.Next);
-   end;
-
   ScriptRes.Add('SECTIONS');
   ScriptRes.Add('{');
   ScriptRes.Add('  .text  0x1000+SIZEOF_HEADERS : {');
@@ -226,6 +212,20 @@ begin
   ScriptRes.Add('    }');
   ScriptRes.Add('  }');
 
+  { Write path to search libraries }
+  HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
+  while assigned(HPath) do
+   begin
+     ScriptRes.Add('SEARCH_DIR("'+GetShortName(HPath.Str)+'")');
+     HPath:=TStringListItem(HPath.Next);
+   end;
+  HPath:=TStringListItem(LibrarySearchPath.First);
+  while assigned(HPath) do
+   begin
+     ScriptRes.Add('SEARCH_DIR("'+GetShortName(HPath.Str)+'")');
+     HPath:=TStringListItem(HPath.Next);
+   end;
+
   { Write staticlibraries }
   if not StaticLibFiles.Empty then
    begin
@@ -481,7 +481,10 @@ initialization
 end.
 {
   $Log$
-  Revision 1.8  2001-07-01 20:16:20  peter
+  Revision 1.9  2001-07-10 21:01:35  peter
+    * fixed crash with writing of the linker script
+
+  Revision 1.8  2001/07/01 20:16:20  peter
     * alignmentinfo record added
     * -Oa argument supports more alignment settings that can be specified
       per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN