From f44c50aafb5a27e7b0a6622b3ee226cf0c681743 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 10 Jul 2001 21:01:35 +0000 Subject: [PATCH] * fixed crash with writing of the linker script --- compiler/script.pas | 6 ++++-- compiler/targets/t_go32v2.pas | 33 ++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/compiler/script.pas b/compiler/script.pas index fb2e382a36..899193f8a3 100644 --- a/compiler/script.pas +++ b/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 diff --git a/compiler/targets/t_go32v2.pas b/compiler/targets/t_go32v2.pas index 2eb328d28f..28529b7ed3 100644 --- a/compiler/targets/t_go32v2.pas +++ b/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