t_linux.pas 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by Peter Vreman
  4. This unit implements support import,export,link routines
  5. for the (i386) Linux target
  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 t_linux;
  20. {$i defines.inc}
  21. interface
  22. uses
  23. import,export,link;
  24. type
  25. timportliblinux=class(timportlib)
  26. procedure preparelib(const s:string);override;
  27. procedure importprocedure(const func,module:string;index:longint;const name:string);override;
  28. procedure importvariable(const varname,module:string;const name:string);override;
  29. procedure generatelib;override;
  30. end;
  31. texportliblinux=class(texportlib)
  32. procedure preparelib(const s : string);override;
  33. procedure exportprocedure(hp : texported_item);override;
  34. procedure exportvar(hp : texported_item);override;
  35. procedure generatelib;override;
  36. end;
  37. tlinkerlinux=class(tlinker)
  38. private
  39. Glibc2,
  40. Glibc21 : boolean;
  41. Function WriteResponseFile(isdll:boolean) : Boolean;
  42. public
  43. constructor Create;override;
  44. procedure SetDefaultInfo;override;
  45. function MakeExecutable:boolean;override;
  46. function MakeSharedLibrary:boolean;override;
  47. end;
  48. implementation
  49. uses
  50. cutils,cclasses,
  51. verbose,systems,globtype,globals,
  52. symconst,script,
  53. fmodule,aasm,cpuasm,cpubase,symsym;
  54. {*****************************************************************************
  55. TIMPORTLIBLINUX
  56. *****************************************************************************}
  57. procedure timportliblinux.preparelib(const s : string);
  58. begin
  59. end;
  60. procedure timportliblinux.importprocedure(const func,module : string;index : longint;const name : string);
  61. begin
  62. { insert sharedlibrary }
  63. current_module.linkothersharedlibs.add(SplitName(module),link_allways);
  64. { do nothing with the procedure, only set the mangledname }
  65. if name<>'' then
  66. aktprocsym.definition.setmangledname(name)
  67. else
  68. message(parser_e_empty_import_name);
  69. end;
  70. procedure timportliblinux.importvariable(const varname,module:string;const name:string);
  71. begin
  72. { insert sharedlibrary }
  73. current_module.linkothersharedlibs.add(SplitName(module),link_allways);
  74. { reset the mangledname and turn off the dll_var option }
  75. aktvarsym.setmangledname(name);
  76. exclude(aktvarsym.varoptions,vo_is_dll_var);
  77. end;
  78. procedure timportliblinux.generatelib;
  79. begin
  80. end;
  81. {*****************************************************************************
  82. TEXPORTLIBLINUX
  83. *****************************************************************************}
  84. procedure texportliblinux.preparelib(const s:string);
  85. begin
  86. end;
  87. procedure texportliblinux.exportprocedure(hp : texported_item);
  88. var
  89. hp2 : texported_item;
  90. begin
  91. { first test the index value }
  92. if (hp.options and eo_index)<>0 then
  93. begin
  94. Message1(parser_e_no_export_with_index_for_target,'linux');
  95. exit;
  96. end;
  97. { now place in correct order }
  98. hp2:=texported_item(current_module._exports.first);
  99. while assigned(hp2) and
  100. (hp.name^>hp2.name^) do
  101. hp2:=texported_item(hp2.next);
  102. { insert hp there !! }
  103. if assigned(hp2) and (hp2.name^=hp.name^) then
  104. begin
  105. { this is not allowed !! }
  106. Message1(parser_e_export_name_double,hp.name^);
  107. exit;
  108. end;
  109. if hp2=texported_item(current_module._exports.first) then
  110. current_module._exports.concat(hp)
  111. else if assigned(hp2) then
  112. begin
  113. hp.next:=hp2;
  114. hp.previous:=hp2.previous;
  115. if assigned(hp2.previous) then
  116. hp2.previous.next:=hp;
  117. hp2.previous:=hp;
  118. end
  119. else
  120. current_module._exports.concat(hp);
  121. end;
  122. procedure texportliblinux.exportvar(hp : texported_item);
  123. begin
  124. hp.is_var:=true;
  125. exportprocedure(hp);
  126. end;
  127. procedure texportliblinux.generatelib;
  128. var
  129. hp2 : texported_item;
  130. begin
  131. hp2:=texported_item(current_module._exports.first);
  132. while assigned(hp2) do
  133. begin
  134. if not hp2.is_var then
  135. begin
  136. { the manglednames can already be the same when the procedure
  137. is declared with cdecl }
  138. if hp2.sym.mangledname<>hp2.name^ then
  139. begin
  140. {$ifdef i386}
  141. { place jump in codesegment }
  142. codesegment.concat(Tai_align.Create_op(4,$90));
  143. codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,0));
  144. codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,newasmsymbol(hp2.sym.mangledname)));
  145. codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
  146. {$endif i386}
  147. end;
  148. end
  149. else
  150. Message1(parser_e_no_export_of_variables_for_target,'linux');
  151. hp2:=texported_item(hp2.next);
  152. end;
  153. end;
  154. {*****************************************************************************
  155. TLINKERLINUX
  156. *****************************************************************************}
  157. Constructor TLinkerLinux.Create;
  158. begin
  159. Inherited Create;
  160. LibrarySearchPath.AddPath('/lib;/usr/lib;/usr/X11R6/lib',true);
  161. end;
  162. procedure TLinkerLinux.SetDefaultInfo;
  163. {
  164. This will also detect which libc version will be used
  165. }
  166. begin
  167. Glibc2:=false;
  168. Glibc21:=false;
  169. with Info do
  170. begin
  171. ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $RES';
  172. DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
  173. DllCmd[2]:='strip --strip-unneeded $EXE';
  174. { first try glibc2 }
  175. DynamicLinker:='/lib/ld-linux.so.2';
  176. if FileExists(DynamicLinker) then
  177. begin
  178. Glibc2:=true;
  179. { Check for 2.0 files, else use the glibc 2.1 stub }
  180. if FileExists('/lib/ld-2.0.*') then
  181. Glibc21:=false
  182. else
  183. Glibc21:=true;
  184. end
  185. else
  186. DynamicLinker:='/lib/ld-linux.so.1';
  187. end;
  188. end;
  189. Function TLinkerLinux.WriteResponseFile(isdll:boolean) : Boolean;
  190. Var
  191. linkres : TLinkRes;
  192. i : longint;
  193. cprtobj,
  194. gprtobj,
  195. prtobj : string[80];
  196. HPath : TStringListItem;
  197. s,s1,s2 : string;
  198. found1,
  199. found2,
  200. linkdynamic,
  201. linklibc : boolean;
  202. begin
  203. WriteResponseFile:=False;
  204. { set special options for some targets }
  205. linkdynamic:=not(SharedLibFiles.empty);
  206. linklibc:=(SharedLibFiles.Find('c')<>nil);
  207. if isdll then
  208. begin
  209. prtobj:='dllprt0';
  210. cprtobj:='dllprt0';
  211. gprtobj:='dllprt0';
  212. end
  213. else
  214. begin
  215. prtobj:='prt0';
  216. cprtobj:='cprt0';
  217. gprtobj:='gprt0';
  218. if glibc21 then
  219. begin
  220. cprtobj:='cprt21';
  221. gprtobj:='gprt21';
  222. end;
  223. end;
  224. if cs_profile in aktmoduleswitches then
  225. begin
  226. prtobj:=gprtobj;
  227. if not glibc2 then
  228. AddSharedLibrary('gmon');
  229. AddSharedLibrary('c');
  230. linklibc:=true;
  231. end
  232. else
  233. begin
  234. if linklibc then
  235. prtobj:=cprtobj;
  236. end;
  237. { Open link.res file }
  238. LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
  239. { Write path to search libraries }
  240. HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
  241. while assigned(HPath) do
  242. begin
  243. LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
  244. HPath:=TStringListItem(HPath.Next);
  245. end;
  246. HPath:=TStringListItem(LibrarySearchPath.First);
  247. while assigned(HPath) do
  248. begin
  249. LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
  250. HPath:=TStringListItem(HPath.Next);
  251. end;
  252. LinkRes.Add('INPUT(');
  253. { add objectfiles, start with prt0 always }
  254. if prtobj<>'' then
  255. LinkRes.AddFileName(FindObjectFile(prtobj,''));
  256. { try to add crti and crtbegin if linking to C }
  257. if linklibc then
  258. begin
  259. if librarysearchpath.FindFile('crtbegin.o',s) then
  260. LinkRes.AddFileName(s);
  261. if librarysearchpath.FindFile('crti.o',s) then
  262. LinkRes.AddFileName(s);
  263. end;
  264. { main objectfiles }
  265. while not ObjectFiles.Empty do
  266. begin
  267. s:=ObjectFiles.GetFirst;
  268. if s<>'' then
  269. LinkRes.AddFileName(s);
  270. end;
  271. LinkRes.Add(')');
  272. { Write staticlibraries }
  273. if not StaticLibFiles.Empty then
  274. begin
  275. LinkRes.Add('GROUP(');
  276. While not StaticLibFiles.Empty do
  277. begin
  278. S:=StaticLibFiles.GetFirst;
  279. LinkRes.AddFileName(s)
  280. end;
  281. LinkRes.Add(')');
  282. end;
  283. { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
  284. here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
  285. if not SharedLibFiles.Empty then
  286. begin
  287. LinkRes.Add('INPUT(');
  288. While not SharedLibFiles.Empty do
  289. begin
  290. S:=SharedLibFiles.GetFirst;
  291. if s<>'c' then
  292. begin
  293. i:=Pos(target_info.sharedlibext,S);
  294. if i>0 then
  295. Delete(S,i,255);
  296. LinkRes.Add('-l'+s);
  297. end
  298. else
  299. begin
  300. linklibc:=true;
  301. linkdynamic:=false; { libc will include the ld-linux for us }
  302. end;
  303. end;
  304. { be sure that libc is the last lib }
  305. if linklibc then
  306. LinkRes.Add('-lc');
  307. { when we have -static for the linker the we also need libgcc }
  308. if (cs_link_staticflag in aktglobalswitches) then
  309. LinkRes.Add('-lgcc');
  310. if linkdynamic and (Info.DynamicLinker<>'') then
  311. LinkRes.AddFileName(Info.DynamicLinker);
  312. LinkRes.Add(')');
  313. end;
  314. { objects which must be at the end }
  315. if linklibc then
  316. begin
  317. found1:=librarysearchpath.FindFile('crtend.o',s1);
  318. found2:=librarysearchpath.FindFile('crtn.o',s2);
  319. if found1 or found2 then
  320. begin
  321. LinkRes.Add('INPUT(');
  322. if found1 then
  323. LinkRes.AddFileName(s1);
  324. if found2 then
  325. LinkRes.AddFileName(s2);
  326. LinkRes.Add(')');
  327. end;
  328. end;
  329. { Write and Close response }
  330. linkres.writetodisk;
  331. linkres.Free;
  332. WriteResponseFile:=True;
  333. end;
  334. function TLinkerLinux.MakeExecutable:boolean;
  335. var
  336. binstr,
  337. cmdstr : string;
  338. success : boolean;
  339. DynLinkStr : string[60];
  340. StaticStr,
  341. StripStr : string[40];
  342. begin
  343. if not(cs_link_extern in aktglobalswitches) then
  344. Message1(exec_i_linking,current_module.exefilename^);
  345. { Create some replacements }
  346. StaticStr:='';
  347. StripStr:='';
  348. DynLinkStr:='';
  349. if (cs_link_staticflag in aktglobalswitches) then
  350. StaticStr:='-static';
  351. if (cs_link_strip in aktglobalswitches) then
  352. StripStr:='-s';
  353. If (cs_profile in aktmoduleswitches) or
  354. ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
  355. DynLinkStr:='-dynamic-linker='+Info.DynamicLinker;
  356. { Write used files and libraries }
  357. WriteResponseFile(false);
  358. { Call linker }
  359. SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
  360. Replace(cmdstr,'$EXE',current_module.exefilename^);
  361. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  362. Replace(cmdstr,'$RES',outputexedir+Info.ResName);
  363. Replace(cmdstr,'$STATIC',StaticStr);
  364. Replace(cmdstr,'$STRIP',StripStr);
  365. Replace(cmdstr,'$DYNLINK',DynLinkStr);
  366. success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
  367. { Remove ReponseFile }
  368. if (success) and not(cs_link_extern in aktglobalswitches) then
  369. RemoveFile(outputexedir+Info.ResName);
  370. MakeExecutable:=success; { otherwise a recursive call to link method }
  371. end;
  372. Function TLinkerLinux.MakeSharedLibrary:boolean;
  373. var
  374. InitStr,
  375. FiniStr,
  376. SoNameStr : string[80];
  377. binstr,
  378. cmdstr : string;
  379. success : boolean;
  380. begin
  381. MakeSharedLibrary:=false;
  382. if not(cs_link_extern in aktglobalswitches) then
  383. Message1(exec_i_linking,current_module.sharedlibfilename^);
  384. { Write used files and libraries }
  385. WriteResponseFile(true);
  386. { Create some replacements }
  387. InitStr:='-init FPC_LIB_START';
  388. FiniStr:='-fini FPC_LIB_EXIT';
  389. SoNameStr:='-soname '+SplitFileName(current_module.sharedlibfilename^);
  390. { Call linker }
  391. SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
  392. Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
  393. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  394. Replace(cmdstr,'$RES',outputexedir+Info.ResName);
  395. Replace(cmdstr,'$INIT',InitStr);
  396. Replace(cmdstr,'$FINI',FiniStr);
  397. Replace(cmdstr,'$SONAME',SoNameStr);
  398. success:=DoExec(FindUtil(binstr),cmdstr,true,false);
  399. { Strip the library ? }
  400. if success and (cs_link_strip in aktglobalswitches) then
  401. begin
  402. SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
  403. Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
  404. success:=DoExec(FindUtil(binstr),cmdstr,true,false);
  405. end;
  406. { Remove ReponseFile }
  407. if (success) and not(cs_link_extern in aktglobalswitches) then
  408. RemoveFile(outputexedir+Info.ResName);
  409. MakeSharedLibrary:=success; { otherwise a recursive call to link method }
  410. end;
  411. {*****************************************************************************
  412. Initialize
  413. *****************************************************************************}
  414. {$ifdef i386}
  415. const
  416. target_i386_linux_info : ttargetinfo =
  417. (
  418. target : target_i386_LINUX;
  419. name : 'Linux for i386';
  420. shortname : 'Linux';
  421. flags : [];
  422. cpu : i386;
  423. unit_env : 'LINUXUNITS';
  424. extradefines : 'UNIX';
  425. sharedlibext : '.so';
  426. staticlibext : '.a';
  427. sourceext : '.pp';
  428. pasext : '.pas';
  429. exeext : '';
  430. defext : '.def';
  431. scriptext : '.sh';
  432. smartext : '.sl';
  433. unitext : '.ppu';
  434. unitlibext : '.ppl';
  435. asmext : '.s';
  436. objext : '.o';
  437. resext : '.res';
  438. resobjext : '.or';
  439. staticlibprefix : 'libp';
  440. sharedlibprefix : 'lib';
  441. Cprefix : '';
  442. newline : #10;
  443. assem : as_i386_elf32;
  444. assemextern : as_i386_as;
  445. link : ld_i386_linux;
  446. linkextern : ld_i386_linux;
  447. ar : ar_gnu_ar;
  448. res : res_none;
  449. endian : endian_little;
  450. stackalignment : 4;
  451. maxCrecordalignment : 4;
  452. size_of_pointer : 4;
  453. size_of_longint : 4;
  454. heapsize : 256*1024;
  455. maxheapsize : 32768*1024;
  456. stacksize : 8192;
  457. DllScanSupported:false;
  458. use_bound_instruction : false;
  459. use_function_relative_addresses : true
  460. );
  461. {$endif i386}
  462. {$ifdef m68k}
  463. const
  464. target_m68k_linux_info : ttargetinfo =
  465. (
  466. target : target_m68k_linux;
  467. name : 'Linux for m68k';
  468. shortname : 'linux';
  469. flags : [];
  470. cpu : m68k;
  471. short_name : 'LINUX';
  472. unit_env : 'LINUXUNITS';
  473. extradefines : 'UNIX';
  474. sharedlibext : '.so';
  475. staticlibext : '.a';
  476. sourceext : '.pp';
  477. pasext : '.pas';
  478. exeext : '';
  479. defext : '';
  480. scriptext : '.sh';
  481. smartext : '.sl';
  482. unitext : '.ppu';
  483. unitlibext : '.ppl';
  484. asmext : '.s';
  485. objext : '.o';
  486. resext : '.res';
  487. resobjext : '.or';
  488. staticlibprefix : 'libp';
  489. sharedlibprefix : 'lib';
  490. Cprefix : '';
  491. newline : #10;
  492. assem : as_m68k_as;
  493. assemextern : as_m68k_as;
  494. link : ld_m68k_linux;
  495. linkextern : ld_m68k_linux;
  496. ar : ar_m68k_ar;
  497. res : res_none;
  498. endian : endian_big;
  499. stackalignment : 2;
  500. maxCrecordalignment : 32;
  501. size_of_pointer : 4;
  502. size_of_longint : 4;
  503. heapsize : 128*1024;
  504. maxheapsize : 32768*1024;
  505. stacksize : 8192;
  506. DllScanSupported:false;
  507. use_bound_instruction : false;
  508. use_function_relative_addresses : true
  509. );
  510. {$endif m68k}
  511. {$ifdef powerpc}
  512. const
  513. target_powerpc_linux_info : ttargetinfo =
  514. (
  515. target : target_powerpc_LINUX;
  516. name : 'Linux for PowerPC';
  517. shortname : 'linuxppc';
  518. flags : [];
  519. cpu : powerpc;
  520. short_name : 'LINUX';
  521. unit_env : '';
  522. extradefines : 'UNIX';
  523. sharedlibext : '.so';
  524. staticlibext : '.s';
  525. sourceext : '.pp';
  526. pasext : '.pas';
  527. exeext : '';
  528. defext : '.def';
  529. scriptext : '.sh';
  530. smartext : '.sl';
  531. unitext : '.ppu';
  532. unitlibext : '.ppl';
  533. asmext : '.s';
  534. objext : '.o';
  535. resext : '.res';
  536. resobjext : '.or';
  537. staticlibprefix : 'libp';
  538. sharedlibprefix : 'lib';
  539. Cprefix : '';
  540. newline : #10;
  541. assem : as_powerpc_as;
  542. assemsrc : as_powerpc_as;
  543. ar : ar_powerpc_ar;
  544. res : res_none;
  545. endian : endian_big;
  546. stackalignment : 8;
  547. maxCrecordalignment : 32;
  548. size_of_pointer : 4;
  549. size_of_longint : 4;
  550. heapsize : 256*1024;
  551. maxheapsize : 32768*1024;
  552. stacksize : 8192;
  553. DllScanSupported:false;
  554. use_bound_instruction : false;
  555. use_function_relative_addresses : true
  556. );
  557. {$endif powerpc}
  558. {$ifdef alpha}
  559. const
  560. target_alpha_linux_info : ttargetinfo =
  561. (
  562. target : target_alpha_LINUX;
  563. name : 'Linux for Alpha';
  564. shortname : 'axplinux';
  565. flags : [];
  566. cpu : alpha;
  567. short_name : 'LINUX';
  568. unit_env : 'LINUXUNITS';
  569. extradefines : 'UNIX';
  570. sharedlibext : '.so';
  571. staticlibext : '.a';
  572. sourceext : '.pp';
  573. pasext : '.pas';
  574. exeext : '';
  575. defext : '.def';
  576. scriptext : '.sh';
  577. smartext : '.sl';
  578. unitext : '.ppu';
  579. unitlibext : '.ppl';
  580. asmext : '.s';
  581. objext : '.o';
  582. resext : '.res';
  583. resobjext : '.or';
  584. staticlibprefix : 'libp';
  585. sharedlibprefix : 'lib';
  586. Cprefix : '';
  587. newline : #10;
  588. assem : as_alpha_as;
  589. assemextern : as_alpha_as;
  590. link : ld_alpha_linux;
  591. linkextern : ld_alpha_linux;
  592. ar : ar_alpha_ar;
  593. res : res_none;
  594. endian : endian_little;
  595. stackalignment : 8;
  596. maxCrecordalignment : 32;
  597. size_of_pointer : 8;
  598. size_of_longint : 4;
  599. heapsize : 256*1024;
  600. maxheapsize : 32768*1024;
  601. stacksize : 8192;
  602. DllScanSupported:false;
  603. use_bound_instruction : false;
  604. use_function_relative_addresses : true
  605. );
  606. {$endif alpha}
  607. initialization
  608. {$ifdef i386}
  609. RegisterLinker(ld_i386_linux,TLinkerLinux);
  610. RegisterImport(target_i386_linux,timportliblinux);
  611. RegisterExport(target_i386_linux,texportliblinux);
  612. RegisterTarget(target_i386_linux_info);
  613. {$endif i386}
  614. {$ifdef m68k}
  615. RegisterLinker(ld_m68k_linux,TLinkerLinux);
  616. RegisterImport(target_m68k_linux,timportliblinux);
  617. RegisterExport(target_m68k_linux,texportliblinux);
  618. RegisterTarget(target_m68k_linux_info);
  619. {$endif m68k}
  620. {$ifdef powerpc}
  621. RegisterLinker(ld_powerpc_linux,TLinkerLinux);
  622. RegisterImport(target_powerpc_linux,timportliblinux);
  623. RegisterExport(target_powerpc_linux,texportliblinux);
  624. RegisterTarget(target_powerpc_linux_info);
  625. {$endif powerpc}
  626. {$ifdef alpha}
  627. RegisterLinker(ld_alpha_linux,TLinkerLinux);
  628. RegisterImport(target_alpha_linux,timportliblinux);
  629. RegisterExport(target_alpha_linux,texportliblinux);
  630. RegisterTarget(target_alpha_linux_info);
  631. {$endif alpha}
  632. end.
  633. {
  634. $Log$
  635. Revision 1.9 2001-06-28 19:46:25 peter
  636. * added override and virtual for constructors
  637. Revision 1.8 2001/06/04 11:51:06 peter
  638. * C linking fixed
  639. Revision 1.7 2001/06/03 15:15:31 peter
  640. * dllprt0 stub for linux shared libs
  641. * pass -init and -fini for linux shared libs
  642. * libprefix splitted into staticlibprefix and sharedlibprefix
  643. Revision 1.6 2001/06/02 19:22:44 peter
  644. * extradefines field added
  645. Revision 1.5 2001/04/21 15:34:01 peter
  646. * fixed writing of end objects to not output an empty INPUT()
  647. Revision 1.4 2001/04/18 22:02:04 peter
  648. * registration of targets and assemblers
  649. Revision 1.3 2001/04/13 01:22:21 peter
  650. * symtable change to classes
  651. * range check generation and errors fixed, make cycle DEBUG=1 works
  652. * memory leaks fixed
  653. Revision 1.2 2001/03/22 10:08:12 michael
  654. + .ctor patch merged from fixbranch
  655. Revision 1.1 2001/02/26 19:43:11 peter
  656. * moved target units to subdir
  657. Revision 1.11 2001/02/20 21:41:17 peter
  658. * new fixfilename, findfile for unix. Look first for lowercase, then
  659. NormalCase and last for UPPERCASE names.
  660. Revision 1.10 2000/12/30 22:53:25 peter
  661. * export with the case provided in the exports section
  662. Revision 1.9 2000/12/25 00:07:30 peter
  663. + new tlinkedlist class (merge of old tstringqueue,tcontainer and
  664. tlinkedlist objects)
  665. Revision 1.8 2000/10/31 22:02:54 peter
  666. * symtable splitted, no real code changes
  667. Revision 1.7 2000/09/24 21:33:47 peter
  668. * message updates merges
  669. Revision 1.6 2000/09/24 15:06:31 peter
  670. * use defines.inc
  671. Revision 1.5 2000/09/10 20:26:55 peter
  672. * bsd patches from marco
  673. Revision 1.4 2000/08/27 16:11:54 peter
  674. * moved some util functions from globals,cobjects to cutils
  675. * splitted files into finput,fmodule
  676. Revision 1.3 2000/07/13 12:08:28 michael
  677. + patched to 1.1.0 with former 1.09patch from peter
  678. Revision 1.2 2000/07/13 11:32:50 michael
  679. + removed logs
  680. }