t_linux.pas 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  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;
  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. linkdynamic,
  199. linklibc : boolean;
  200. begin
  201. WriteResponseFile:=False;
  202. { set special options for some targets }
  203. linkdynamic:=not(SharedLibFiles.empty);
  204. linklibc:=(SharedLibFiles.Find('c')<>nil);
  205. if isdll then
  206. begin
  207. prtobj:='dllprt0';
  208. cprtobj:='dllprt0';
  209. gprtobj:='dllprt0';
  210. end
  211. else
  212. begin
  213. prtobj:='prt0';
  214. cprtobj:='cprt0';
  215. gprtobj:='gprt0';
  216. if glibc21 then
  217. begin
  218. cprtobj:='cprt21';
  219. gprtobj:='gprt21';
  220. end;
  221. end;
  222. if cs_profile in aktmoduleswitches then
  223. begin
  224. prtobj:=gprtobj;
  225. if not glibc2 then
  226. AddSharedLibrary('gmon');
  227. AddSharedLibrary('c');
  228. linklibc:=true;
  229. end
  230. else
  231. begin
  232. if linklibc then
  233. prtobj:=cprtobj;
  234. end;
  235. { Open link.res file }
  236. LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
  237. { Write path to search libraries }
  238. HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
  239. while assigned(HPath) do
  240. begin
  241. LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
  242. HPath:=TStringListItem(HPath.Next);
  243. end;
  244. HPath:=TStringListItem(LibrarySearchPath.First);
  245. while assigned(HPath) do
  246. begin
  247. LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
  248. HPath:=TStringListItem(HPath.Next);
  249. end;
  250. LinkRes.Add('INPUT(');
  251. { add objectfiles, start with prt0 always }
  252. if prtobj<>'' then
  253. LinkRes.AddFileName(FindObjectFile(prtobj,''));
  254. { try to add crti and crtbegin if linking to C }
  255. if linklibc then
  256. begin
  257. if librarysearchpath.FindFile('crtbegin.o',s) then
  258. LinkRes.AddFileName(s);
  259. if librarysearchpath.FindFile('crti.o',s) then
  260. LinkRes.AddFileName(s);
  261. end;
  262. { main objectfiles }
  263. while not ObjectFiles.Empty do
  264. begin
  265. s:=ObjectFiles.GetFirst;
  266. if s<>'' then
  267. LinkRes.AddFileName(s);
  268. end;
  269. LinkRes.Add(')');
  270. { Write staticlibraries }
  271. if not StaticLibFiles.Empty then
  272. begin
  273. LinkRes.Add('GROUP(');
  274. While not StaticLibFiles.Empty do
  275. begin
  276. S:=StaticLibFiles.GetFirst;
  277. LinkRes.AddFileName(s)
  278. end;
  279. LinkRes.Add(')');
  280. end;
  281. { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
  282. here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
  283. if not SharedLibFiles.Empty then
  284. begin
  285. LinkRes.Add('INPUT(');
  286. While not SharedLibFiles.Empty do
  287. begin
  288. S:=SharedLibFiles.GetFirst;
  289. if s<>'c' then
  290. begin
  291. i:=Pos(target_info.sharedlibext,S);
  292. if i>0 then
  293. Delete(S,i,255);
  294. LinkRes.Add('-l'+s);
  295. end
  296. else
  297. begin
  298. linklibc:=true;
  299. linkdynamic:=false; { libc will include the ld-linux for us }
  300. end;
  301. end;
  302. { be sure that libc is the last lib }
  303. if linklibc then
  304. LinkRes.Add('-lc');
  305. { when we have -static for the linker the we also need libgcc }
  306. if (cs_link_staticflag in aktglobalswitches) then
  307. LinkRes.Add('-lgcc');
  308. if linkdynamic and (Info.DynamicLinker<>'') then
  309. LinkRes.AddFileName(Info.DynamicLinker);
  310. LinkRes.Add(')');
  311. end;
  312. { objects which must be at the end }
  313. if linklibc then
  314. begin
  315. if librarysearchpath.FindFile('crtend.o',s1) or
  316. librarysearchpath.FindFile('crtn.o',s2) then
  317. begin
  318. LinkRes.Add('INPUT(');
  319. LinkRes.AddFileName(s1);
  320. LinkRes.AddFileName(s2);
  321. LinkRes.Add(')');
  322. end;
  323. end;
  324. { Write and Close response }
  325. linkres.writetodisk;
  326. linkres.Free;
  327. WriteResponseFile:=True;
  328. end;
  329. function TLinkerLinux.MakeExecutable:boolean;
  330. var
  331. binstr,
  332. cmdstr : string;
  333. success : boolean;
  334. DynLinkStr : string[60];
  335. StaticStr,
  336. StripStr : string[40];
  337. begin
  338. if not(cs_link_extern in aktglobalswitches) then
  339. Message1(exec_i_linking,current_module.exefilename^);
  340. { Create some replacements }
  341. StaticStr:='';
  342. StripStr:='';
  343. DynLinkStr:='';
  344. if (cs_link_staticflag in aktglobalswitches) then
  345. StaticStr:='-static';
  346. if (cs_link_strip in aktglobalswitches) then
  347. StripStr:='-s';
  348. If (cs_profile in aktmoduleswitches) or
  349. ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
  350. DynLinkStr:='-dynamic-linker='+Info.DynamicLinker;
  351. { Write used files and libraries }
  352. WriteResponseFile(false);
  353. { Call linker }
  354. SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
  355. Replace(cmdstr,'$EXE',current_module.exefilename^);
  356. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  357. Replace(cmdstr,'$RES',outputexedir+Info.ResName);
  358. Replace(cmdstr,'$STATIC',StaticStr);
  359. Replace(cmdstr,'$STRIP',StripStr);
  360. Replace(cmdstr,'$DYNLINK',DynLinkStr);
  361. success:=DoExec(FindUtil(BinStr),CmdStr,true,false);
  362. { Remove ReponseFile }
  363. if (success) and not(cs_link_extern in aktglobalswitches) then
  364. RemoveFile(outputexedir+Info.ResName);
  365. MakeExecutable:=success; { otherwise a recursive call to link method }
  366. end;
  367. Function TLinkerLinux.MakeSharedLibrary:boolean;
  368. var
  369. InitStr,
  370. FiniStr,
  371. SoNameStr : string[80];
  372. binstr,
  373. cmdstr : string;
  374. success : boolean;
  375. begin
  376. MakeSharedLibrary:=false;
  377. if not(cs_link_extern in aktglobalswitches) then
  378. Message1(exec_i_linking,current_module.sharedlibfilename^);
  379. { Write used files and libraries }
  380. WriteResponseFile(true);
  381. { Create some replacements }
  382. InitStr:='-init FPC_LIB_START';
  383. FiniStr:='-fini FPC_LIB_EXIT';
  384. SoNameStr:='-soname '+SplitFileName(current_module.sharedlibfilename^);
  385. { Call linker }
  386. SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
  387. Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
  388. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  389. Replace(cmdstr,'$RES',outputexedir+Info.ResName);
  390. Replace(cmdstr,'$INIT',InitStr);
  391. Replace(cmdstr,'$FINI',FiniStr);
  392. Replace(cmdstr,'$SONAME',SoNameStr);
  393. success:=DoExec(FindUtil(binstr),cmdstr,true,false);
  394. { Strip the library ? }
  395. if success and (cs_link_strip in aktglobalswitches) then
  396. begin
  397. SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
  398. Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
  399. success:=DoExec(FindUtil(binstr),cmdstr,true,false);
  400. end;
  401. { Remove ReponseFile }
  402. if (success) and not(cs_link_extern in aktglobalswitches) then
  403. RemoveFile(outputexedir+Info.ResName);
  404. MakeSharedLibrary:=success; { otherwise a recursive call to link method }
  405. end;
  406. {*****************************************************************************
  407. Initialize
  408. *****************************************************************************}
  409. {$ifdef i386}
  410. const
  411. target_i386_linux_info : ttargetinfo =
  412. (
  413. target : target_i386_LINUX;
  414. name : 'Linux for i386';
  415. shortname : 'Linux';
  416. flags : [];
  417. cpu : i386;
  418. unit_env : 'LINUXUNITS';
  419. extradefines : 'UNIX';
  420. sharedlibext : '.so';
  421. staticlibext : '.a';
  422. sourceext : '.pp';
  423. pasext : '.pas';
  424. exeext : '';
  425. defext : '.def';
  426. scriptext : '.sh';
  427. smartext : '.sl';
  428. unitext : '.ppu';
  429. unitlibext : '.ppl';
  430. asmext : '.s';
  431. objext : '.o';
  432. resext : '.res';
  433. resobjext : '.or';
  434. staticlibprefix : 'libp';
  435. sharedlibprefix : 'lib';
  436. Cprefix : '';
  437. newline : #10;
  438. assem : as_i386_elf32;
  439. assemextern : as_i386_as;
  440. link : ld_i386_linux;
  441. linkextern : ld_i386_linux;
  442. ar : ar_gnu_ar;
  443. res : res_none;
  444. endian : endian_little;
  445. stackalignment : 4;
  446. maxCrecordalignment : 4;
  447. size_of_pointer : 4;
  448. size_of_longint : 4;
  449. heapsize : 256*1024;
  450. maxheapsize : 32768*1024;
  451. stacksize : 8192;
  452. DllScanSupported:false;
  453. use_bound_instruction : false;
  454. use_function_relative_addresses : true
  455. );
  456. {$endif i386}
  457. {$ifdef m68k}
  458. const
  459. target_m68k_linux_info : ttargetinfo =
  460. (
  461. target : target_m68k_linux;
  462. name : 'Linux for m68k';
  463. shortname : 'linux';
  464. flags : [];
  465. cpu : m68k;
  466. short_name : 'LINUX';
  467. unit_env : 'LINUXUNITS';
  468. extradefines : 'UNIX';
  469. sharedlibext : '.so';
  470. staticlibext : '.a';
  471. sourceext : '.pp';
  472. pasext : '.pas';
  473. exeext : '';
  474. defext : '';
  475. scriptext : '.sh';
  476. smartext : '.sl';
  477. unitext : '.ppu';
  478. unitlibext : '.ppl';
  479. asmext : '.s';
  480. objext : '.o';
  481. resext : '.res';
  482. resobjext : '.or';
  483. staticlibprefix : 'libp';
  484. sharedlibprefix : 'lib';
  485. Cprefix : '';
  486. newline : #10;
  487. assem : as_m68k_as;
  488. assemextern : as_m68k_as;
  489. link : ld_m68k_linux;
  490. linkextern : ld_m68k_linux;
  491. ar : ar_m68k_ar;
  492. res : res_none;
  493. endian : endian_big;
  494. stackalignment : 2;
  495. maxCrecordalignment : 32;
  496. size_of_pointer : 4;
  497. size_of_longint : 4;
  498. heapsize : 128*1024;
  499. maxheapsize : 32768*1024;
  500. stacksize : 8192;
  501. DllScanSupported:false;
  502. use_bound_instruction : false;
  503. use_function_relative_addresses : true
  504. );
  505. {$endif m68k}
  506. {$ifdef powerpc}
  507. const
  508. target_powerpc_linux_info : ttargetinfo =
  509. (
  510. target : target_powerpc_LINUX;
  511. name : 'Linux for PowerPC';
  512. shortname : 'linuxppc';
  513. flags : [];
  514. cpu : powerpc;
  515. short_name : 'LINUX';
  516. unit_env : '';
  517. extradefines : 'UNIX';
  518. sharedlibext : '.so';
  519. staticlibext : '.s';
  520. sourceext : '.pp';
  521. pasext : '.pas';
  522. exeext : '';
  523. defext : '.def';
  524. scriptext : '.sh';
  525. smartext : '.sl';
  526. unitext : '.ppu';
  527. unitlibext : '.ppl';
  528. asmext : '.s';
  529. objext : '.o';
  530. resext : '.res';
  531. resobjext : '.or';
  532. staticlibprefix : 'libp';
  533. sharedlibprefix : 'lib';
  534. Cprefix : '';
  535. newline : #10;
  536. assem : as_powerpc_as;
  537. assemsrc : as_powerpc_as;
  538. ar : ar_powerpc_ar;
  539. res : res_none;
  540. endian : endian_big;
  541. stackalignment : 8;
  542. maxCrecordalignment : 32;
  543. size_of_pointer : 4;
  544. size_of_longint : 4;
  545. heapsize : 256*1024;
  546. maxheapsize : 32768*1024;
  547. stacksize : 8192;
  548. DllScanSupported:false;
  549. use_bound_instruction : false;
  550. use_function_relative_addresses : true
  551. );
  552. {$endif powerpc}
  553. {$ifdef alpha}
  554. const
  555. target_alpha_linux_info : ttargetinfo =
  556. (
  557. target : target_alpha_LINUX;
  558. name : 'Linux for Alpha';
  559. shortname : 'axplinux';
  560. flags : [];
  561. cpu : alpha;
  562. short_name : 'LINUX';
  563. unit_env : 'LINUXUNITS';
  564. extradefines : 'UNIX';
  565. sharedlibext : '.so';
  566. staticlibext : '.a';
  567. sourceext : '.pp';
  568. pasext : '.pas';
  569. exeext : '';
  570. defext : '.def';
  571. scriptext : '.sh';
  572. smartext : '.sl';
  573. unitext : '.ppu';
  574. unitlibext : '.ppl';
  575. asmext : '.s';
  576. objext : '.o';
  577. resext : '.res';
  578. resobjext : '.or';
  579. staticlibprefix : 'libp';
  580. sharedlibprefix : 'lib';
  581. Cprefix : '';
  582. newline : #10;
  583. assem : as_alpha_as;
  584. assemextern : as_alpha_as;
  585. link : ld_alpha_linux;
  586. linkextern : ld_alpha_linux;
  587. ar : ar_alpha_ar;
  588. res : res_none;
  589. endian : endian_little;
  590. stackalignment : 8;
  591. maxCrecordalignment : 32;
  592. size_of_pointer : 8;
  593. size_of_longint : 4;
  594. heapsize : 256*1024;
  595. maxheapsize : 32768*1024;
  596. stacksize : 8192;
  597. DllScanSupported:false;
  598. use_bound_instruction : false;
  599. use_function_relative_addresses : true
  600. );
  601. {$endif alpha}
  602. initialization
  603. {$ifdef i386}
  604. RegisterLinker(ld_i386_linux,TLinkerLinux);
  605. RegisterImport(target_i386_linux,timportliblinux);
  606. RegisterExport(target_i386_linux,texportliblinux);
  607. RegisterTarget(target_i386_linux_info);
  608. {$endif i386}
  609. {$ifdef m68k}
  610. RegisterLinker(ld_m68k_linux,TLinkerLinux);
  611. RegisterImport(target_m68k_linux,timportliblinux);
  612. RegisterExport(target_m68k_linux,texportliblinux);
  613. RegisterTarget(target_m68k_linux_info);
  614. {$endif m68k}
  615. {$ifdef powerpc}
  616. RegisterLinker(ld_powerpc_linux,TLinkerLinux);
  617. RegisterImport(target_powerpc_linux,timportliblinux);
  618. RegisterExport(target_powerpc_linux,texportliblinux);
  619. RegisterTarget(target_powerpc_linux_info);
  620. {$endif powerpc}
  621. {$ifdef alpha}
  622. RegisterLinker(ld_alpha_linux,TLinkerLinux);
  623. RegisterImport(target_alpha_linux,timportliblinux);
  624. RegisterExport(target_alpha_linux,texportliblinux);
  625. RegisterTarget(target_alpha_linux_info);
  626. {$endif alpha}
  627. end.
  628. {
  629. $Log$
  630. Revision 1.7 2001-06-03 15:15:31 peter
  631. * dllprt0 stub for linux shared libs
  632. * pass -init and -fini for linux shared libs
  633. * libprefix splitted into staticlibprefix and sharedlibprefix
  634. Revision 1.6 2001/06/02 19:22:44 peter
  635. * extradefines field added
  636. Revision 1.5 2001/04/21 15:34:01 peter
  637. * fixed writing of end objects to not output an empty INPUT()
  638. Revision 1.4 2001/04/18 22:02:04 peter
  639. * registration of targets and assemblers
  640. Revision 1.3 2001/04/13 01:22:21 peter
  641. * symtable change to classes
  642. * range check generation and errors fixed, make cycle DEBUG=1 works
  643. * memory leaks fixed
  644. Revision 1.2 2001/03/22 10:08:12 michael
  645. + .ctor patch merged from fixbranch
  646. Revision 1.1 2001/02/26 19:43:11 peter
  647. * moved target units to subdir
  648. Revision 1.11 2001/02/20 21:41:17 peter
  649. * new fixfilename, findfile for unix. Look first for lowercase, then
  650. NormalCase and last for UPPERCASE names.
  651. Revision 1.10 2000/12/30 22:53:25 peter
  652. * export with the case provided in the exports section
  653. Revision 1.9 2000/12/25 00:07:30 peter
  654. + new tlinkedlist class (merge of old tstringqueue,tcontainer and
  655. tlinkedlist objects)
  656. Revision 1.8 2000/10/31 22:02:54 peter
  657. * symtable splitted, no real code changes
  658. Revision 1.7 2000/09/24 21:33:47 peter
  659. * message updates merges
  660. Revision 1.6 2000/09/24 15:06:31 peter
  661. * use defines.inc
  662. Revision 1.5 2000/09/10 20:26:55 peter
  663. * bsd patches from marco
  664. Revision 1.4 2000/08/27 16:11:54 peter
  665. * moved some util functions from globals,cobjects to cutils
  666. * splitted files into finput,fmodule
  667. Revision 1.3 2000/07/13 12:08:28 michael
  668. + patched to 1.1.0 with former 1.09patch from peter
  669. Revision 1.2 2000/07/13 11:32:50 michael
  670. + removed logs
  671. }