t_bsd.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Peter Vreman (original Linux)
  4. (c) 2000 by Marco van de Voort (FreeBSD mods)
  5. This unit implements support import,export,link routines
  6. for the (i386)FreeBSD target
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ****************************************************************************
  19. }
  20. unit t_bsd;
  21. {$i fpcdefs.inc}
  22. interface
  23. implementation
  24. uses
  25. {$ifdef gdb}
  26. gdb,
  27. {$endif gdb}
  28. cutils,cclasses,
  29. verbose,systems,globtype,globals,
  30. symconst,script,
  31. fmodule,aasmbase,aasmtai,aasmcpu,cpubase,symsym,symdef,
  32. import,export,link,i_bsd,
  33. cgutils,cgbase,cgobj,cpuinfo;
  34. type
  35. tdarwinimported_item = class(timported_item)
  36. procdef : tprocdef;
  37. end;
  38. timportlibdarwin=class(timportlib)
  39. procedure preparelib(const s:string);override;
  40. procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
  41. procedure importvariable(vs:tglobalvarsym;const name,module:string);override;
  42. procedure generatelib;override;
  43. procedure generatesmartlib;override;
  44. end;
  45. timportlibbsd=class(timportlib)
  46. procedure preparelib(const s:string);override;
  47. procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
  48. procedure importvariable(vs:tglobalvarsym;const name,module:string);override;
  49. procedure generatelib;override;
  50. end;
  51. texportlibbsd=class(texportlib)
  52. procedure preparelib(const s : string);override;
  53. procedure exportprocedure(hp : texported_item);override;
  54. procedure exportvar(hp : texported_item);override;
  55. procedure generatelib;override;
  56. end;
  57. tlinkerbsd=class(texternallinker)
  58. private
  59. LdSupportsNoResponseFile : boolean;
  60. LibrarySuffix : Char;
  61. Function WriteResponseFile(isdll:boolean) : Boolean;
  62. public
  63. constructor Create;override;
  64. procedure SetDefaultInfo;override;
  65. function MakeExecutable:boolean;override;
  66. function MakeSharedLibrary:boolean;override;
  67. end;
  68. {*****************************************************************************
  69. TIMPORTLIBDARWIN
  70. *****************************************************************************}
  71. procedure timportlibdarwin.preparelib(const s : string);
  72. begin
  73. if not(assigned(importssection)) then
  74. importssection:=TAAsmoutput.create;
  75. end;
  76. procedure timportlibdarwin.importprocedure(aprocdef:tprocdef;const module : string;index : longint;const name : string);
  77. begin
  78. { insert sharedlibrary }
  79. { current_module.linkothersharedlibs.add(SplitName(module),link_allways); }
  80. end;
  81. procedure timportlibdarwin.importvariable(vs:tglobalvarsym;const name,module:string);
  82. begin
  83. { insert sharedlibrary }
  84. { current_module.linkothersharedlibs.add(SplitName(module),link_allways); }
  85. { the rest is handled in the nppcld.pas tppcloadnode }
  86. vs.set_mangledname(name);
  87. end;
  88. procedure timportlibdarwin.generatesmartlib;
  89. begin
  90. generatelib;
  91. end;
  92. procedure timportlibdarwin.generatelib;
  93. begin
  94. end;
  95. {*****************************************************************************
  96. TIMPORTLIBBSD
  97. *****************************************************************************}
  98. procedure timportlibbsd.preparelib(const s : string);
  99. begin
  100. end;
  101. procedure timportlibbsd.importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);
  102. begin
  103. { insert sharedlibrary }
  104. current_module.linkothersharedlibs.add(SplitName(module),link_allways);
  105. end;
  106. procedure timportlibbsd.importvariable(vs:tglobalvarsym;const name,module:string);
  107. begin
  108. { insert sharedlibrary }
  109. current_module.linkothersharedlibs.add(SplitName(module),link_allways);
  110. { reset the mangledname and turn off the dll_var option }
  111. vs.set_mangledname(name);
  112. exclude(vs.varoptions,vo_is_dll_var);
  113. end;
  114. procedure timportlibbsd.generatelib;
  115. begin
  116. end;
  117. {*****************************************************************************
  118. TEXPORTLIBBSD
  119. *****************************************************************************}
  120. procedure texportlibbsd.preparelib(const s:string);
  121. begin
  122. end;
  123. procedure texportlibbsd.exportprocedure(hp : texported_item);
  124. var
  125. hp2 : texported_item;
  126. begin
  127. { first test the index value }
  128. if (hp.options and eo_index)<>0 then
  129. begin
  130. Message1(parser_e_no_export_with_index_for_target,'freebsd');
  131. exit;
  132. end;
  133. { now place in correct order }
  134. hp2:=texported_item(current_module._exports.first);
  135. while assigned(hp2) and
  136. (hp.name^>hp2.name^) do
  137. hp2:=texported_item(hp2.next);
  138. { insert hp there !! }
  139. if assigned(hp2) and (hp2.name^=hp.name^) then
  140. begin
  141. { this is not allowed !! }
  142. Message1(parser_e_export_name_double,hp.name^);
  143. exit;
  144. end;
  145. if hp2=texported_item(current_module._exports.first) then
  146. current_module._exports.concat(hp)
  147. else if assigned(hp2) then
  148. begin
  149. hp.next:=hp2;
  150. hp.previous:=hp2.previous;
  151. if assigned(hp2.previous) then
  152. hp2.previous.next:=hp;
  153. hp2.previous:=hp;
  154. end
  155. else
  156. current_module._exports.concat(hp);
  157. end;
  158. procedure texportlibbsd.exportvar(hp : texported_item);
  159. begin
  160. hp.is_var:=true;
  161. exportprocedure(hp);
  162. end;
  163. procedure texportlibbsd.generatelib;
  164. var
  165. hp2 : texported_item;
  166. begin
  167. hp2:=texported_item(current_module._exports.first);
  168. while assigned(hp2) do
  169. begin
  170. if (not hp2.is_var) and
  171. (hp2.sym.typ=procsym) then
  172. begin
  173. { the manglednames can already be the same when the procedure
  174. is declared with cdecl }
  175. if tprocsym(hp2.sym).first_procdef.mangledname<>hp2.name^ then
  176. begin
  177. {$ifdef i386}
  178. { place jump in codesegment }
  179. codesegment.concat(Tai_align.Create_op(4,$90));
  180. codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,AT_FUNCTION,0));
  181. codeSegment.concat(Taicpu.Op_sym(A_JMP,S_NO,objectlibrary.newasmsymbol(tprocsym(hp2.sym).first_procdef.mangledname,AB_EXTERNAL,AT_FUNCTION)));
  182. codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
  183. {$endif i386}
  184. end;
  185. end
  186. else
  187. Message1(parser_e_no_export_of_variables_for_target,'freebsd');
  188. hp2:=texported_item(hp2.next);
  189. end;
  190. end;
  191. {*****************************************************************************
  192. TLINKERLINUX
  193. *****************************************************************************}
  194. Constructor TLinkerBSD.Create;
  195. begin
  196. Inherited Create;
  197. if not Dontlinkstdlibpath Then
  198. if (target_info.system <> system_powerpc_darwin) then
  199. LibrarySearchPath.AddPath('/lib;/usr/lib;/usr/X11R6/lib',true)
  200. else
  201. { Mac OS X doesn't have a /lib }
  202. LibrarySearchPath.AddPath('/usr/lib',true)
  203. end;
  204. procedure TLinkerBSD.SetDefaultInfo;
  205. {
  206. This will also detect which libc version will be used
  207. }
  208. begin
  209. LibrarySuffix:=' ';
  210. LdSupportsNoResponseFile := (target_info.system in [system_m68k_netbsd,system_powerpc_darwin]);
  211. with Info do
  212. begin
  213. if LdSupportsNoResponseFile then
  214. begin
  215. ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE `cat $RES`';
  216. end
  217. else
  218. ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $RES';
  219. DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
  220. DllCmd[2]:='strip --strip-unneeded $EXE';
  221. { first try glibc2 }
  222. {$ifdef GLIBC2} {Keep linux code in place. FBSD might go to a different
  223. glibc too once}
  224. DynamicLinker:='/lib/ld-linux.so.2';
  225. if FileExists(DynamicLinker) then
  226. begin
  227. Glibc2:=true;
  228. { Check for 2.0 files, else use the glibc 2.1 stub }
  229. if FileExists('/lib/ld-2.0.*') then
  230. Glibc21:=false
  231. else
  232. Glibc21:=true;
  233. end
  234. else
  235. DynamicLinker:='/lib/ld-linux.so.1';
  236. {$else}
  237. DynamicLinker:='';
  238. {$endif}
  239. end;
  240. end;
  241. Function TLinkerBSD.WriteResponseFile(isdll:boolean) : Boolean;
  242. Var
  243. linkres : TLinkRes;
  244. i : longint;
  245. cprtobj,
  246. gprtobj,
  247. prtobj : string[80];
  248. HPath : TStringListItem;
  249. s,s1,s2 : string;
  250. linkpthread,
  251. linkdynamic,
  252. linklibc : boolean;
  253. Fl1,Fl2 : Boolean;
  254. begin
  255. WriteResponseFile:=False;
  256. { set special options for some targets }
  257. if target_info.system <> system_powerpc_darwin then
  258. begin
  259. linkdynamic:=not(SharedLibFiles.empty);
  260. linklibc:=(SharedLibFiles.Find('c')<>nil);
  261. linkpthread:=(SharedLibFiles.Find('pthread')<>nil);
  262. if (target_info.system =system_i386_freebsd) and linkpthread Then
  263. Begin
  264. if not (cs_link_pthread in aktglobalswitches) Then
  265. begin
  266. {delete pthreads from list, in this case it is in libc_r}
  267. SharedLibFiles.Remove(SharedLibFiles.Find('pthread').str);
  268. LibrarySuffix:='r';
  269. end;
  270. End;
  271. prtobj:='prt0';
  272. cprtobj:='cprt0';
  273. gprtobj:='gprt0';
  274. if cs_profile in aktmoduleswitches then
  275. begin
  276. prtobj:=gprtobj;
  277. AddSharedLibrary('c');
  278. LibrarySuffix:='p';
  279. linklibc:=true;
  280. end
  281. else
  282. begin
  283. if linklibc then
  284. prtobj:=cprtobj;
  285. end;
  286. end
  287. else
  288. begin
  289. { for darwin: always link dynamically against libc }
  290. linklibc := true;
  291. if not(cs_profile in aktmoduleswitches) then
  292. prtobj:='/usr/lib/crt1.o'
  293. else
  294. prtobj:='/usr/lib/gcrt1.o';
  295. end;
  296. { Open link.res file }
  297. LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
  298. { Write path to search libraries }
  299. HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
  300. while assigned(HPath) do
  301. begin
  302. if LdSupportsNoResponseFile then
  303. LinkRes.Add(maybequoted('-L'+HPath.Str))
  304. else
  305. LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
  306. HPath:=TStringListItem(HPath.Next);
  307. end;
  308. HPath:=TStringListItem(LibrarySearchPath.First);
  309. while assigned(HPath) do
  310. begin
  311. if LdSupportsNoResponseFile then
  312. LinkRes.Add(maybequoted('-L'+HPath.Str))
  313. else
  314. LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
  315. HPath:=TStringListItem(HPath.Next);
  316. end;
  317. if not LdSupportsNoResponseFile then
  318. LinkRes.Add('INPUT(');
  319. { add objectfiles, start with prt0 always }
  320. if prtobj<>'' then
  321. LinkRes.AddFileName(FindObjectFile(prtobj,'',false));
  322. { try to add crti and crtbegin if linking to C }
  323. if linklibc and
  324. (target_info.system <> system_powerpc_darwin) then
  325. begin
  326. if librarysearchpath.FindFile('crtbegin.o',s) then
  327. LinkRes.AddFileName(s);
  328. if librarysearchpath.FindFile('crti.o',s) then
  329. LinkRes.AddFileName(s);
  330. end;
  331. { main objectfiles }
  332. while not ObjectFiles.Empty do
  333. begin
  334. s:=ObjectFiles.GetFirst;
  335. if s<>'' then
  336. LinkRes.AddFileName(maybequoted(s));
  337. end;
  338. if not LdSupportsNoResponseFile then
  339. LinkRes.Add(')');
  340. { Write staticlibraries }
  341. if not StaticLibFiles.Empty then
  342. begin
  343. if not LdSupportsNoResponseFile then
  344. LinkRes.Add('GROUP(');
  345. While not StaticLibFiles.Empty do
  346. begin
  347. S:=StaticLibFiles.GetFirst;
  348. LinkRes.AddFileName(maybequoted(s))
  349. end;
  350. if not LdSupportsNoResponseFile then
  351. LinkRes.Add(')');
  352. end;
  353. { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
  354. here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
  355. if not SharedLibFiles.Empty then
  356. begin
  357. if not LdSupportsNoResponseFile then
  358. LinkRes.Add('INPUT(');
  359. While not SharedLibFiles.Empty do
  360. begin
  361. S:=SharedLibFiles.GetFirst;
  362. if s<>'c' then
  363. begin
  364. i:=Pos(target_info.sharedlibext,S);
  365. if i>0 then
  366. Delete(S,i,255);
  367. LinkRes.Add('-l'+s);
  368. end
  369. else
  370. begin
  371. linklibc:=true;
  372. linkdynamic:=false; { libc will include the ld-linux for us }
  373. end;
  374. end;
  375. { be sure that libc is the last lib }
  376. if linklibc then
  377. Begin
  378. If LibrarySuffix=' ' Then
  379. LinkRes.Add('-lc')
  380. else
  381. LinkRes.Add('-lc_'+LibrarySuffix);
  382. If LibrarySuffix='r' Then
  383. LinkRes.Add('-lc');
  384. end;
  385. { when we have -static for the linker the we also need libgcc }
  386. if (cs_link_staticflag in aktglobalswitches) then
  387. LinkRes.Add('-lgcc');
  388. if linkdynamic and (Info.DynamicLinker<>'') then
  389. LinkRes.AddFileName(Info.DynamicLinker);
  390. if not LdSupportsNoResponseFile then
  391. LinkRes.Add(')');
  392. end;
  393. { objects which must be at the end }
  394. if linklibc and
  395. (target_info.system <> system_powerpc_darwin) then
  396. begin
  397. Fl1:=librarysearchpath.FindFile('crtend.o',s1);
  398. Fl2:=librarysearchpath.FindFile('crtn.o',s2);
  399. if Fl1 or Fl2 then
  400. begin
  401. LinkRes.Add('INPUT(');
  402. If Fl1 Then
  403. LinkRes.AddFileName(s1);
  404. If Fl2 Then
  405. LinkRes.AddFileName(s2);
  406. LinkRes.Add(')');
  407. end;
  408. end;
  409. { Write and Close response }
  410. linkres.writetodisk;
  411. linkres.Free;
  412. WriteResponseFile:=True;
  413. end;
  414. function TLinkerBSD.MakeExecutable:boolean;
  415. var
  416. binstr : String;
  417. cmdstr : TCmdStr;
  418. success : boolean;
  419. DynLinkStr : string[60];
  420. GCSectionsStr,
  421. StaticStr,
  422. StripStr : string[40];
  423. begin
  424. if not(cs_link_extern in aktglobalswitches) then
  425. Message1(exec_i_linking,current_module.exefilename^);
  426. { Create some replacements }
  427. StaticStr:='';
  428. StripStr:='';
  429. DynLinkStr:='';
  430. GCSectionsStr:='';
  431. if (cs_link_staticflag in aktglobalswitches) then
  432. begin
  433. if (target_info.system=system_m68k_netbsd) and
  434. ((cs_link_on_target in aktglobalswitches) or
  435. (target_info.system=source_info.system)) then
  436. StaticStr:='-Bstatic'
  437. else
  438. StaticStr:='-static';
  439. end;
  440. if (cs_link_strip in aktglobalswitches) then
  441. if (target_info.system <> system_powerpc_darwin) then
  442. StripStr:='-s'
  443. else
  444. StripStr:='-x';
  445. if (cs_link_smart in aktglobalswitches) and
  446. (tf_smartlink_sections in target_info.flags) then
  447. GCSectionsStr:='--gc-sections';
  448. If (cs_profile in aktmoduleswitches) or
  449. ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
  450. DynLinkStr:='-dynamic-linker='+Info.DynamicLinker;
  451. if CShared Then
  452. DynLinKStr:=DynLinkStr+' --shared';
  453. { Write used files and libraries }
  454. WriteResponseFile(false);
  455. { Call linker }
  456. SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
  457. Replace(cmdstr,'$EXE',maybequoted(current_module.exefilename^));
  458. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  459. Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
  460. Replace(cmdstr,'$STATIC',StaticStr);
  461. Replace(cmdstr,'$STRIP',StripStr);
  462. Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
  463. Replace(cmdstr,'$DYNLINK',DynLinkStr);
  464. success:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,LdSupportsNoResponseFile);
  465. { Remove ReponseFile }
  466. if (success) and not(cs_link_extern in aktglobalswitches) then
  467. RemoveFile(outputexedir+Info.ResName);
  468. MakeExecutable:=success; { otherwise a recursive call to link method }
  469. end;
  470. Function TLinkerBSD.MakeSharedLibrary:boolean;
  471. var
  472. InitStr,
  473. FiniStr,
  474. SoNameStr : string[80];
  475. binstr : String;
  476. cmdstr : TCmdStr;
  477. success : boolean;
  478. begin
  479. MakeSharedLibrary:=false;
  480. if not(cs_link_extern in aktglobalswitches) then
  481. Message1(exec_i_linking,current_module.sharedlibfilename^);
  482. { Write used files and libraries }
  483. WriteResponseFile(true);
  484. InitStr:='-init FPC_LIB_START';
  485. FiniStr:='-fini FPC_LIB_EXIT';
  486. SoNameStr:='-soname '+SplitFileName(current_module.sharedlibfilename^);
  487. { Call linker }
  488. SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
  489. Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
  490. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  491. Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
  492. Replace(cmdstr,'$INIT',InitStr);
  493. Replace(cmdstr,'$FINI',FiniStr);
  494. Replace(cmdstr,'$SONAME',SoNameStr);
  495. success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
  496. { Strip the library ? }
  497. if success and (cs_link_strip in aktglobalswitches) then
  498. begin
  499. SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
  500. Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
  501. success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
  502. end;
  503. { Remove ReponseFile }
  504. if (success) and not(cs_link_extern in aktglobalswitches) then
  505. RemoveFile(outputexedir+Info.ResName);
  506. MakeSharedLibrary:=success; { otherwise a recursive call to link method }
  507. end;
  508. {*****************************************************************************
  509. Initialize
  510. *****************************************************************************}
  511. initialization
  512. {$ifdef x86_64}
  513. RegisterExternalLinker(system_x86_64_FreeBSD_info,TLinkerBSD);
  514. RegisterImport(system_x86_64_freebsd,timportlibbsd);
  515. RegisterExport(system_x86_64_freebsd,texportlibbsd);
  516. RegisterTarget(system_x86_64_freebsd_info);
  517. {$endif}
  518. {$ifdef i386}
  519. RegisterExternalLinker(system_i386_FreeBSD_info,TLinkerBSD);
  520. RegisterExternalLinker(system_i386_NetBSD_info,TLinkerBSD);
  521. RegisterExternalLinker(system_i386_OpenBSD_info,TLinkerBSD);
  522. RegisterImport(system_i386_freebsd,timportlibbsd);
  523. RegisterExport(system_i386_freebsd,texportlibbsd);
  524. RegisterTarget(system_i386_freebsd_info);
  525. RegisterImport(system_i386_netbsd,timportlibbsd);
  526. RegisterExport(system_i386_netbsd,texportlibbsd);
  527. RegisterTarget(system_i386_netbsd_info);
  528. RegisterImport(system_i386_openbsd,timportlibbsd);
  529. RegisterExport(system_i386_openbsd,texportlibbsd);
  530. RegisterTarget(system_i386_openbsd_info);
  531. {$endif i386}
  532. {$ifdef m68k}
  533. // RegisterExternalLinker(system_m68k_FreeBSD_info,TLinkerBSD);
  534. RegisterExternalLinker(system_m68k_NetBSD_info,TLinkerBSD);
  535. RegisterImport(system_m68k_netbsd,timportlibbsd);
  536. RegisterExport(system_m68k_netbsd,texportlibbsd);
  537. RegisterTarget(system_m68k_netbsd_info);
  538. {$endif m68k}
  539. {$ifdef powerpc}
  540. // RegisterExternalLinker(system_m68k_FreeBSD_info,TLinkerBSD);
  541. RegisterExternalLinker(system_powerpc_darwin_info,TLinkerBSD);
  542. RegisterImport(system_powerpc_darwin,timportlibdarwin);
  543. RegisterExport(system_powerpc_darwin,texportlibbsd);
  544. RegisterTarget(system_powerpc_darwin_info);
  545. RegisterExternalLinker(system_powerpc_netbsd_info,TLinkerBSD);
  546. RegisterImport(system_powerpc_netbsd,timportlibbsd);
  547. RegisterExport(system_powerpc_netbsd,texportlibbsd);
  548. RegisterTarget(system_powerpc_netbsd_info);
  549. {$endif powerpc}
  550. end.
  551. {
  552. $Log$
  553. Revision 1.30 2005-04-27 21:47:08 marco
  554. * $GCSECTIONS also added to else case
  555. Revision 1.29 2005/04/27 14:47:54 marco
  556. * tf_smartlink_sections and some shared lib pull-ups from t_linux
  557. Revision 1.28 2005/02/14 17:13:10 peter
  558. * truncate log
  559. }