link.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. {
  2. $Id$
  3. Copyright (c) 1998 by the FPC development team
  4. This unit handles the linker and binder calls for programs and
  5. libraries
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. Unit link;
  20. Interface
  21. uses cobjects,files;
  22. Type
  23. TLinker = Object
  24. Glibc2,
  25. LinkToC, { Should we link to the C libs? }
  26. Strip : Boolean; { Strip symbols ? }
  27. ObjectFiles,
  28. SharedLibFiles,
  29. StaticLibFiles : TStringContainer;
  30. LibrarySearchPath, { Search path for libraries }
  31. LinkOptions : string; { Additional options to the linker }
  32. DynamicLinker : String[80]; { What Dynamic linker ? }
  33. LinkResName : String[32]; { Name of response file }
  34. { Methods }
  35. Constructor Init;
  36. Destructor Done;
  37. procedure AddModuleFiles(hp:pmodule);
  38. function FindObjectFile(s : string) : string;
  39. function FindLibraryFile(s:string;const ext:string) : string;
  40. Procedure AddObject(const S : String);
  41. Procedure AddStaticLibrary(const S : String);
  42. Procedure AddSharedLibrary(S : String);
  43. Function FindLinker:String; { Find linker, sets Name }
  44. Function DoExec(const command,para:string;info,useshell:boolean):boolean;
  45. Function WriteResponseFile:Boolean;
  46. Function MakeExecutable:boolean;
  47. Procedure MakeStaticLibrary(filescnt:longint);
  48. Procedure MakeSharedLibrary;
  49. end;
  50. PLinker=^TLinker;
  51. Var
  52. Linker : TLinker;
  53. Implementation
  54. uses
  55. Script,globals,systems,verbose
  56. {$ifdef i386}
  57. ,win_targ
  58. {$endif}
  59. {$ifdef linux}
  60. ,linux
  61. {$endif}
  62. ,dos
  63. ;
  64. {$ifndef linux}
  65. Procedure Shell(command:string);
  66. { This is already defined in the linux.ppu for linux, need for the *
  67. expansion under linux }
  68. var
  69. comspec : string;
  70. begin
  71. comspec:=getenv('COMSPEC');
  72. Exec(comspec,' /C '+command);
  73. end;
  74. {$endif}
  75. Constructor TLinker.Init;
  76. begin
  77. ObjectFiles.Init_no_double;
  78. SharedLibFiles.Init_no_double;
  79. StaticLibFiles.Init_no_double;
  80. LinkToC:=False;
  81. Glibc2:=false;
  82. Strip:=false;
  83. LinkOptions:='';
  84. {$ifdef linux}
  85. { first try glibc2 }
  86. DynamicLinker:='/lib/ld-linux.so.2';
  87. if FileExists(DynamicLinker) then
  88. Glibc2:=true
  89. else
  90. DynamicLinker:='/lib/ld-linux.so.1';
  91. LibrarySearchPath:='/lib;/usr/lib';
  92. {$else}
  93. DynamicLinker:='';
  94. LibrarySearchPath:='';
  95. {$endif}
  96. LinkResName:='link.res';
  97. end;
  98. Destructor TLinker.Done;
  99. begin
  100. ObjectFiles.Done;
  101. SharedLibFiles.Done;
  102. StaticLibFiles.Done;
  103. end;
  104. procedure TLinker.AddModuleFiles(hp:pmodule);
  105. begin
  106. with hp^ do
  107. begin
  108. while not linkofiles.empty do
  109. AddObject(linkofiles.Get);
  110. while not linksharedlibs.empty do
  111. AddSharedLibrary(linksharedlibs.Get);
  112. while not linkstaticlibs.empty do
  113. AddStaticLibrary(linkstaticlibs.Get);
  114. end;
  115. end;
  116. var
  117. LastLDBin : string;
  118. Function TLinker.FindLinker:string;
  119. var
  120. ldfound : boolean;
  121. begin
  122. if LastLDBin='' then
  123. begin
  124. if utilsdirectory<>'' then
  125. begin
  126. LastLDBin:=Search(target_link.linkbin+source_os.exeext,
  127. utilsdirectory,ldfound)+target_link.linkbin+source_os.exeext;
  128. end
  129. else
  130. LastLDBin:=FindExe(target_link.linkbin,ldfound);
  131. if (not ldfound) and not(cs_link_extern in aktglobalswitches) then
  132. begin
  133. Message1(exec_w_linker_not_found,LastLDBin);
  134. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  135. end;
  136. if ldfound then
  137. Message1(exec_t_using_linker,LastLDBin);
  138. end;
  139. FindLinker:=LastLDBin;
  140. end;
  141. { searches an object file }
  142. function TLinker.FindObjectFile(s:string) : string;
  143. var
  144. found : boolean;
  145. begin
  146. if pos('.',s)=0 then
  147. s:=s+target_info.objext;
  148. s:=FixFileName(s);
  149. if FileExists(s) then
  150. begin
  151. Findobjectfile:=s;
  152. exit;
  153. end;
  154. findobjectfile:=search(s,'.;'+unitsearchpath+';'+exepath,found)+s;
  155. if not(cs_link_extern in aktglobalswitches) and (not found) then
  156. Message1(exec_w_objfile_not_found,s);
  157. end;
  158. { searches an library file }
  159. function TLinker.FindLibraryFile(s:string;const ext:string) : string;
  160. var
  161. found : boolean;
  162. begin
  163. if pos('.',s)=0 then
  164. s:=s+ext;
  165. if FileExists(s) then
  166. begin
  167. FindLibraryFile:=s;
  168. exit;
  169. end;
  170. findlibraryfile:=search(s,'.;'+librarysearchpath+';'+exepath,found)+s;
  171. if not(cs_link_extern in aktglobalswitches) and (not found) then
  172. Message1(exec_w_libfile_not_found,s);
  173. end;
  174. Procedure TLinker.AddObject(const S : String);
  175. begin
  176. ObjectFiles.Insert(FindObjectFile(s));
  177. end;
  178. Procedure TLinker.AddSharedLibrary(S:String);
  179. begin
  180. { remove prefix 'lib' }
  181. if Copy(s,1,length(target_os.libprefix))=target_os.libprefix then
  182. Delete(s,1,length(target_os.libprefix));
  183. { remove extension if any }
  184. if Copy(s,length(s)-length(target_os.sharedlibext)+1,length(target_os.sharedlibext))=target_os.sharedlibext then
  185. Delete(s,length(s)-length(target_os.sharedlibext)+1,length(target_os.sharedlibext)+1);
  186. { ready to be inserted }
  187. SharedLibFiles.Insert (S);
  188. end;
  189. Procedure TLinker.AddStaticLibrary(const S:String);
  190. begin
  191. StaticLibFiles.Insert(FindLibraryFile(s,target_os.staticlibext));
  192. end;
  193. Function TLinker.DoExec(const command,para:string;info,useshell:boolean):boolean;
  194. begin
  195. DoExec:=true;
  196. if not(cs_link_extern in aktglobalswitches) then
  197. begin
  198. swapvectors;
  199. if useshell then
  200. shell(command+' '+para)
  201. else
  202. exec(command,para);
  203. swapvectors;
  204. if (doserror<>0) then
  205. begin
  206. Message(exec_w_cant_call_linker);
  207. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  208. DoExec:=false;
  209. end
  210. else
  211. if (dosexitcode<>0) then
  212. begin
  213. Message(exec_w_error_while_linking);
  214. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  215. DoExec:=false;
  216. end;
  217. end;
  218. { Update asmres when externmode is set }
  219. if cs_link_extern in aktglobalswitches then
  220. begin
  221. if info then
  222. AsmRes.AddLinkCommand(Command,Para,current_module^.exefilename^)
  223. else
  224. AsmRes.AddLinkCommand(Command,Para,'');
  225. end;
  226. end;
  227. Function TLinker.WriteResponseFile : Boolean;
  228. Var
  229. LinkResponse : Text;
  230. i : longint;
  231. prtobj,s,s2 : string;
  232. found,
  233. linklibc : boolean;
  234. procedure WriteRes(const s:string);
  235. begin
  236. if s<>'' then
  237. WriteLn(Linkresponse,s);
  238. end;
  239. begin
  240. WriteResponseFile:=False;
  241. { set special options for some targets }
  242. linklibc:=false;
  243. prtobj:='prt0';
  244. case target_info.target of
  245. target_m68k_Palmos,
  246. {* Changes made by Ozerski 27.10.1998}
  247. target_i386_Win32 :begin
  248. if DLLsource then
  249. prtobj:='wdllprt0'
  250. else
  251. prtobj:='wprt0';
  252. end;
  253. {* End changes}
  254. target_m68k_linux,
  255. target_i386_linux :
  256. begin
  257. linklibc:=SharedLibFiles.Find('c');
  258. if cs_profile in aktmoduleswitches then
  259. begin
  260. prtobj:='gprt0';
  261. if not glibc2 then
  262. AddSharedLibrary('gmon');
  263. AddSharedLibrary('c');
  264. linklibc:=true;
  265. end
  266. else
  267. begin
  268. if linklibc then
  269. prtobj:='cprt0';
  270. end;
  271. end;
  272. end;
  273. { Fix command line options }
  274. If not SharedLibFiles.Empty then
  275. LinkOptions:='-dynamic-linker='+DynamicLinker+' '+LinkOptions;
  276. if Strip and not(cs_debuginfo in aktmoduleswitches) then
  277. LinkOptions:=LinkOptions+target_link.stripopt;
  278. { Open linkresponse and write header }
  279. assign(linkresponse,inputdir+LinkResName);
  280. {$I-}
  281. rewrite(linkresponse);
  282. {$I+}
  283. if ioresult<>0 then
  284. exit;
  285. { Write library searchpath }
  286. S2:=LibrarySearchPath;
  287. Repeat
  288. i:=Pos(';',S2);
  289. If i=0 then
  290. i:=255;
  291. S:=Copy(S2,1,i-1);
  292. If S<>'' then
  293. WriteRes(target_link.libpathprefix+s+target_link.libpathsuffix);
  294. Delete (S2,1,i);
  295. until S2='';
  296. WriteRes(target_link.inputstart);
  297. { add objectfiles, start with prt0 always }
  298. if prtobj<>'' then
  299. WriteRes(FindObjectFile(prtobj));
  300. if linklibc then
  301. begin
  302. WriteRes(search('crti.o',librarysearchpath,found)+'crti.o');
  303. WriteRes(search('crtbegin.o',librarysearchpath,found)+'crtbegin.o');
  304. end;
  305. while not ObjectFiles.Empty do
  306. begin
  307. s:=ObjectFiles.Get;
  308. if s<>'' then
  309. WriteRes(s);
  310. end;
  311. if linklibc then
  312. begin
  313. WriteRes(search('crtend.o',librarysearchpath,found)+'crtend.o');
  314. WriteRes(search('crtn.o',librarysearchpath,found)+'crtn.o');
  315. end;
  316. { Write sharedlibraries like -l<lib> }
  317. While not SharedLibFiles.Empty do
  318. begin
  319. S:=SharedLibFiles.Get;
  320. i:=Pos(target_os.sharedlibext,S);
  321. if i>0 then
  322. Delete(S,i,255);
  323. WriteRes(target_link.libprefix+s);
  324. end;
  325. WriteRes(target_link.inputend);
  326. { Write staticlibraries }
  327. if not StaticLibFiles.Empty then
  328. begin
  329. WriteRes(target_link.GroupStart);
  330. While not StaticLibFiles.Empty do
  331. begin
  332. S:=StaticLibFiles.Get;
  333. WriteRes(s)
  334. end;
  335. WriteRes(target_link.GroupEnd);
  336. end;
  337. { Close response }
  338. close(linkresponse);
  339. WriteResponseFile:=True;
  340. end;
  341. function TLinker.MakeExecutable:boolean;
  342. var
  343. bindbin : string[80];
  344. bindfound : boolean;
  345. s : string;
  346. success : boolean;
  347. {* Changes made by Ozerski 27.10.1998}
  348. ii:longint;
  349. {* end changes}
  350. begin
  351. {$ifdef linux}
  352. if LinkToC then
  353. begin
  354. AddObject('/usr/lib/crt0.o');
  355. AddObject('lprt');
  356. AddStaticLibrary('libc.a');
  357. AddStaticLibrary('libgcc.a');
  358. end;
  359. {$endif Linux}
  360. { Write used files and libraries }
  361. WriteResponseFile;
  362. { Call linker }
  363. if not(cs_link_extern in aktglobalswitches) then
  364. Message1(exec_i_linking,current_module^.exefilename^);
  365. s:=target_link.linkcmd;
  366. {* Changes made by Ozerski 27.10.1998}
  367. if DLLsource then
  368. Replace(s,'$EXE',current_module^.sharedlibfilename^)
  369. else
  370. Replace(s,'$EXE',current_module^.exefilename^);
  371. {* end changes}
  372. Replace(s,'$OPT',LinkOptions);
  373. Replace(s,'$RES',inputdir+LinkResName);
  374. success:=DoExec(FindLinker,s,true,false);
  375. {Bind}
  376. {* Changes made by Ozerski 27.10.1998}
  377. if (target_link.bindbin[1]<>'') and
  378. ((target_info.target<>target_i386_win32) or bind_win32_dll) then
  379. for ii:=1 to target_link.binders do
  380. begin
  381. s:=target_link.bindcmd[ii];
  382. Replace(s,'$OPT',LinkOptions);
  383. Replace(s,'$RES',inputdir+LinkResName);
  384. if DLLsource then
  385. Replace(s,'$EXE',current_module^.sharedlibfilename^)
  386. else
  387. Replace(s,'$EXE',current_module^.exefilename^);
  388. {* end changes}
  389. {Size of the heap when an EMX program runs in OS/2.}
  390. Replace(s,'$HEAPMB',tostr((maxheapsize+1048575) shr 20));
  391. {Size of the stack when an EMX program runs in OS/2.}
  392. Replace(s,'$STACKKB',tostr((stacksize+1023) shr 10));
  393. {When an EMX program runs in DOS, the heap and stack share the
  394. same memory pool. The heap grows upwards, the stack grows downwards.}
  395. Replace(s,'$DOSHEAPKB',tostr((stacksize+maxheapsize+1023) shr 10));
  396. {* Changes made by Ozerski 27.10.1998}
  397. if utilsdirectory<>'' then
  398. begin
  399. bindbin:=Search(target_link.bindbin[ii]+source_os.exeext,
  400. utilsdirectory,bindfound)+target_link.bindbin[ii]+source_os.exeext;
  401. end
  402. else
  403. bindbin:=FindExe(target_link.bindbin[ii],bindfound);
  404. {* end changes}
  405. if (not bindfound) and not (cs_link_extern in aktglobalswitches) then
  406. begin
  407. Message1(exec_w_binder_not_found,bindbin);
  408. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  409. end;
  410. DoExec(bindbin,s,false,false);
  411. end;
  412. { Post processor executable }
  413. {$ifdef i386}
  414. if target_info.target=target_i386_Win32 then
  415. win_targ.postprocessexecutable(current_module^.exefilename^);
  416. {$endif}
  417. {Remove ReponseFile}
  418. if (success) and not(cs_link_extern in aktglobalswitches) then
  419. RemoveFile(LinkResName);
  420. MakeExecutable:=success; { otherwise a recursive call to link method }
  421. end;
  422. Procedure TLinker.MakeStaticLibrary(filescnt:longint);
  423. {
  424. FilesCnt holds the amount of .o files created, if filescnt=0 then
  425. no smartlinking is used
  426. }
  427. var
  428. smartpath,
  429. s,
  430. arbin : string;
  431. arfound : boolean;
  432. cnt : longint;
  433. begin
  434. smartpath:=current_module^.path^+FixPath(FixFileName(current_module^.modulename^)+target_info.smartext,false);
  435. { find ar binary }
  436. if utilsdirectory<>'' then
  437. begin
  438. arbin:=Search(target_ar.arbin+source_os.exeext,
  439. utilsdirectory,arfound)+target_ar.arbin+source_os.exeext;
  440. end
  441. else
  442. arbin:=FindExe(target_ar.arbin,arfound);
  443. if (not arfound) and not(cs_link_extern in aktglobalswitches) then
  444. begin
  445. Message(exec_w_ar_not_found);
  446. aktglobalswitches:=aktglobalswitches+[cs_link_extern];
  447. end;
  448. s:=target_ar.arcmd;
  449. Replace(s,'$LIB',current_module^.staticlibfilename^);
  450. if filescnt=0 then
  451. Replace(s,'$FILES',current_module^.objfilename^)
  452. else
  453. Replace(s,'$FILES',FixFileName(smartpath+current_module^.asmprefix^+'*'+target_info.objext));
  454. DoExec(arbin,s,false,true);
  455. { Clean up }
  456. if not(cs_asm_leave in aktglobalswitches) and not(cs_link_extern in aktglobalswitches) then
  457. begin
  458. if filescnt=0 then
  459. RemoveFile(current_module^.objfilename^)
  460. else
  461. begin
  462. for cnt:=1 to filescnt do
  463. if not RemoveFile(FixFileName(smartpath+current_module^.asmprefix^+tostr(cnt)+target_info.objext)) then
  464. RemoveFile(FixFileName(smartpath+current_module^.asmprefix^+'e'+tostr(cnt)+target_info.objext));
  465. RemoveDir(smartpath);
  466. end;
  467. end;
  468. end;
  469. Procedure TLinker.MakeSharedLibrary;
  470. var
  471. s : string;
  472. begin
  473. s:=' -shared -o $LIB $FILES';
  474. Replace(s,'$LIB',current_module^.sharedlibfilename^);
  475. Replace(s,'$FILES',current_module^.objfilename^);
  476. if DoExec(FindLinker,s,false,false) then
  477. RemoveFile(current_module^.objfilename^);
  478. end;
  479. end.
  480. {
  481. $Log$
  482. Revision 1.39 1998-11-30 13:26:23 pierre
  483. * the code for ordering the exported procs/vars was buggy
  484. + added -WB to force binding (Ozerski way of creating DLL)
  485. this is off by default as direct writing of .edata section seems
  486. OK
  487. Revision 1.38 1998/11/30 09:43:13 pierre
  488. * some range check bugs fixed (still not working !)
  489. + added DLL writing support for win32 (also accepts variables)
  490. + TempAnsi for code that could be used for Temporary ansi strings
  491. handling
  492. Revision 1.37 1998/10/26 22:23:31 peter
  493. + fixpath() has an extra option to allow a ./ as path
  494. Revision 1.36 1998/10/22 15:18:44 florian
  495. + switch -vx for win32 added
  496. Revision 1.35 1998/10/19 18:06:23 peter
  497. * use no_double
  498. Revision 1.34 1998/10/16 13:37:18 florian
  499. + switch -FD added to specify the path for utilities
  500. Revision 1.33 1998/10/14 13:38:22 peter
  501. * fixed path with staticlib/objects in ppufiles
  502. Revision 1.32 1998/10/14 11:03:55 daniel
  503. * Forgot to dereference a pointer.
  504. Revision 1.31 1998/10/14 11:01:21 daniel
  505. * Staticlibfilename no longer not include a path. Correction when calling
  506. ar.
  507. Revision 1.30 1998/10/13 13:10:18 peter
  508. * new style for m68k/i386 infos and enums
  509. Revision 1.29 1998/10/13 08:19:34 pierre
  510. + source_os is now set correctly for cross-processor compilers
  511. (tos contains all target_infos and
  512. we use CPU86 and CPU68 conditionnals to
  513. get the source operating system
  514. this only works if you do not undefine
  515. the source target !!)
  516. * several cg68k memory leaks fixed
  517. + started to change the code so that it should be possible to have
  518. a complete compiler (both for m68k and i386 !!)
  519. Revision 1.28 1998/10/08 23:28:56 peter
  520. * -vu shows unit info, -vt shows tried/used files
  521. Revision 1.27 1998/10/06 17:16:52 pierre
  522. * some memory leaks fixed (thanks to Peter for heaptrc !)
  523. Revision 1.26 1998/09/29 15:23:05 peter
  524. * remove also the end files for smartlinking
  525. Revision 1.25 1998/09/10 15:25:31 daniel
  526. + Added maxheapsize.
  527. * Corrected semi-bug in calling the assembler and the linker
  528. Revision 1.24 1998/09/07 18:32:45 peter
  529. * fixed for m68k
  530. Revision 1.23 1998/09/03 17:39:04 florian
  531. + better code for type conversation longint/dword to real type
  532. Revision 1.22 1998/09/01 09:01:00 peter
  533. + glibc2 support
  534. Revision 1.21 1998/08/31 12:26:26 peter
  535. * m68k and palmos updates from surebugfixes
  536. Revision 1.20 1998/08/19 10:06:14 peter
  537. * fixed filenames and removedir which supports slash at the end
  538. Revision 1.19 1998/08/17 09:17:47 peter
  539. * static/shared linking updates
  540. Revision 1.18 1998/08/14 21:56:34 peter
  541. * setting the outputfile using -o works now to create static libs
  542. Revision 1.17 1998/08/14 18:16:08 peter
  543. * return after a failed call will now add it to ppas
  544. Revision 1.16 1998/08/12 19:28:15 peter
  545. * better libc support
  546. Revision 1.15 1998/08/10 14:50:02 peter
  547. + localswitches, moduleswitches, globalswitches splitting
  548. Revision 1.14 1998/06/17 14:10:13 peter
  549. * small os2 fixes
  550. * fixed interdependent units with newppu (remake3 under linux works now)
  551. Revision 1.13 1998/06/08 22:59:46 peter
  552. * smartlinking works for win32
  553. * some defines to exclude some compiler parts
  554. Revision 1.12 1998/06/04 23:51:44 peter
  555. * m68k compiles
  556. + .def file creation moved to gendef.pas so it could also be used
  557. for win32
  558. Revision 1.11 1998/05/27 00:20:31 peter
  559. * some scanner optimizes
  560. * automaticly aout2exe for go32v1
  561. * fixed dynamiclinker option which was added at the wrong place
  562. Revision 1.10 1998/05/22 12:32:47 peter
  563. * fixed -L on the commandline, Dos commandline is only 128 bytes
  564. Revision 1.9 1998/05/12 10:46:59 peter
  565. * moved printstatus to verb_def
  566. + V_Normal which is between V_Error and V_Warning and doesn't have a
  567. prefix like error: warning: and is included in V_Default
  568. * fixed some messages
  569. * first time parameter scan is only for -v and -T
  570. - removed old style messages
  571. Revision 1.8 1998/05/11 13:07:54 peter
  572. + $ifdef NEWPPU for the new ppuformat
  573. + $define GDB not longer required
  574. * removed all warnings and stripped some log comments
  575. * no findfirst/findnext anymore to remove smartlink *.o files
  576. Revision 1.7 1998/05/08 09:21:20 michael
  577. * Added missing -Fl message to messages file.
  578. * Corrected mangling of file names when doing Linklib
  579. * -Fl now actually WORKS.
  580. * Librarysearchpath is now a field in linker object.
  581. Revision 1.6 1998/05/06 09:26:49 peter
  582. * fixed ld call with shell
  583. Revision 1.4 1998/05/04 17:54:25 peter
  584. + smartlinking works (only case jumptable left todo)
  585. * redesign of systems.pas to support assemblers and linkers
  586. + Unitname is now also in the PPU-file, increased version to 14
  587. Revision 1.3 1998/04/16 10:54:30 daniel
  588. * Fixed linking for OS/2.
  589. }