t_linux.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 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 fpcdefs.inc}
  21. interface
  22. uses
  23. symsym,symdef,
  24. import,export,link;
  25. type
  26. timportliblinux=class(timportlib)
  27. procedure preparelib(const s:string);override;
  28. procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
  29. procedure importvariable(vs:tvarsym;const name,module:string);override;
  30. procedure generatelib;override;
  31. end;
  32. texportliblinux=class(texportlib)
  33. procedure preparelib(const s : string);override;
  34. procedure exportprocedure(hp : texported_item);override;
  35. procedure exportvar(hp : texported_item);override;
  36. procedure generatelib;override;
  37. end;
  38. tlinkerlinux=class(texternallinker)
  39. private
  40. Glibc2,
  41. Glibc21 : boolean;
  42. Function WriteResponseFile(isdll:boolean) : Boolean;
  43. public
  44. constructor Create;override;
  45. procedure SetDefaultInfo;override;
  46. function MakeExecutable:boolean;override;
  47. function MakeSharedLibrary:boolean;override;
  48. end;
  49. implementation
  50. uses
  51. cutils,cclasses,
  52. verbose,systems,globtype,globals,
  53. symconst,script,
  54. fmodule,dos
  55. ,aasmbase,aasmtai,aasmcpu,cpubase,cgobj
  56. ,i_linux
  57. ;
  58. {*****************************************************************************
  59. TIMPORTLIBLINUX
  60. *****************************************************************************}
  61. procedure timportliblinux.preparelib(const s : string);
  62. begin
  63. end;
  64. procedure timportliblinux.importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);
  65. begin
  66. { insert sharedlibrary }
  67. current_module.linkothersharedlibs.add(SplitName(module),link_allways);
  68. { do nothing with the procedure, only set the mangledname }
  69. if name<>'' then
  70. begin
  71. aprocdef.setmangledname(name);
  72. end
  73. else
  74. message(parser_e_empty_import_name);
  75. end;
  76. procedure timportliblinux.importvariable(vs:tvarsym;const name,module:string);
  77. begin
  78. { insert sharedlibrary }
  79. current_module.linkothersharedlibs.add(SplitName(module),link_allways);
  80. { reset the mangledname and turn off the dll_var option }
  81. vs.set_mangledname(name);
  82. exclude(vs.varoptions,vo_is_dll_var);
  83. end;
  84. procedure timportliblinux.generatelib;
  85. begin
  86. end;
  87. {*****************************************************************************
  88. TEXPORTLIBLINUX
  89. *****************************************************************************}
  90. procedure texportliblinux.preparelib(const s:string);
  91. begin
  92. end;
  93. procedure texportliblinux.exportprocedure(hp : texported_item);
  94. var
  95. hp2 : texported_item;
  96. begin
  97. { first test the index value }
  98. if (hp.options and eo_index)<>0 then
  99. begin
  100. Message1(parser_e_no_export_with_index_for_target,'linux');
  101. exit;
  102. end;
  103. { now place in correct order }
  104. hp2:=texported_item(current_module._exports.first);
  105. while assigned(hp2) and
  106. (hp.name^>hp2.name^) do
  107. hp2:=texported_item(hp2.next);
  108. { insert hp there !! }
  109. if assigned(hp2) and (hp2.name^=hp.name^) then
  110. begin
  111. { this is not allowed !! }
  112. Message1(parser_e_export_name_double,hp.name^);
  113. exit;
  114. end;
  115. if hp2=texported_item(current_module._exports.first) then
  116. current_module._exports.concat(hp)
  117. else if assigned(hp2) then
  118. begin
  119. hp.next:=hp2;
  120. hp.previous:=hp2.previous;
  121. if assigned(hp2.previous) then
  122. hp2.previous.next:=hp;
  123. hp2.previous:=hp;
  124. end
  125. else
  126. current_module._exports.concat(hp);
  127. end;
  128. procedure texportliblinux.exportvar(hp : texported_item);
  129. begin
  130. hp.is_var:=true;
  131. exportprocedure(hp);
  132. end;
  133. procedure texportliblinux.generatelib;
  134. var
  135. hp2 : texported_item;
  136. begin
  137. hp2:=texported_item(current_module._exports.first);
  138. while assigned(hp2) do
  139. begin
  140. if (not hp2.is_var) and
  141. (hp2.sym.typ=procsym) then
  142. begin
  143. { the manglednames can already be the same when the procedure
  144. is declared with cdecl }
  145. if tprocsym(hp2.sym).first_procdef.mangledname<>hp2.name^ then
  146. begin
  147. { place jump in codesegment }
  148. codesegment.concat(tai_align.create(target_info.alignment.procalign));
  149. codeSegment.concat(Tai_symbol.Createname_global(hp2.name^,AT_FUNCTION,0));
  150. cg.a_jmp_name(codesegment,tprocsym(hp2.sym).first_procdef.mangledname);
  151. codeSegment.concat(Tai_symbol_end.Createname(hp2.name^));
  152. end;
  153. end
  154. else
  155. Message1(parser_e_no_export_of_variables_for_target,'linux');
  156. hp2:=texported_item(hp2.next);
  157. end;
  158. end;
  159. {*****************************************************************************
  160. TLINKERLINUX
  161. *****************************************************************************}
  162. Constructor TLinkerLinux.Create;
  163. begin
  164. Inherited Create;
  165. if NOT Dontlinkstdlibpath Then
  166. LibrarySearchPath.AddPath('/lib;/usr/lib;/usr/X11R6/lib',true);
  167. end;
  168. procedure TLinkerLinux.SetDefaultInfo;
  169. {
  170. This will also detect which libc version will be used
  171. }
  172. {$ifdef m68k}
  173. var
  174. St : SearchRec;
  175. {$endif m68k}
  176. begin
  177. Glibc2:=false;
  178. Glibc21:=false;
  179. with Info do
  180. begin
  181. ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $RES';
  182. DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
  183. DllCmd[2]:='strip --strip-unneeded $EXE';
  184. {$ifdef m68k}
  185. Glibc2:=true;
  186. FindFirst('/lib/ld*',AnyFile,st);
  187. while DosError=0 do
  188. begin
  189. if copy(st.name,1,5)='ld-2.' then
  190. begin
  191. DynamicLinker:='/lib/'+St.name;
  192. Glibc21:=st.name[6]<>'0';
  193. break;
  194. end;
  195. FindNext(St);
  196. end;
  197. FindClose(St);
  198. {$else m68k}
  199. {$ifdef i386}
  200. { first try glibc2 }
  201. DynamicLinker:='/lib/ld-linux.so.2';
  202. if FileExists(DynamicLinker) then
  203. begin
  204. Glibc2:=true;
  205. { Check for 2.0 files, else use the glibc 2.1 stub }
  206. if FileExists('/lib/ld-2.0.*') then
  207. Glibc21:=false
  208. else
  209. Glibc21:=true;
  210. end
  211. else
  212. DynamicLinker:='/lib/ld-linux.so.1';
  213. {$else i386}
  214. Glibc2 := true;
  215. DynamicLinker:='/lib/ld.so.1';
  216. {$endif i386}
  217. {$endif m68k}
  218. end;
  219. end;
  220. Function TLinkerLinux.WriteResponseFile(isdll:boolean) : Boolean;
  221. Var
  222. linkres : TLinkRes;
  223. i : longint;
  224. cprtobj,
  225. gprtobj,
  226. prtobj : string[80];
  227. HPath : TStringListItem;
  228. s,s1,s2 : string;
  229. found1,
  230. found2,
  231. linkdynamic,
  232. linklibc : boolean;
  233. begin
  234. WriteResponseFile:=False;
  235. { set special options for some targets }
  236. linkdynamic:=not(SharedLibFiles.empty);
  237. linklibc:=(SharedLibFiles.Find('c')<>nil);
  238. if isdll then
  239. begin
  240. prtobj:='dllprt0';
  241. cprtobj:='dllprt0';
  242. gprtobj:='dllprt0';
  243. end
  244. else
  245. begin
  246. prtobj:='prt0';
  247. cprtobj:='cprt0';
  248. gprtobj:='gprt0';
  249. if glibc21 then
  250. begin
  251. cprtobj:='cprt21';
  252. gprtobj:='gprt21';
  253. end;
  254. end;
  255. if cs_profile in aktmoduleswitches then
  256. begin
  257. prtobj:=gprtobj;
  258. if not glibc2 then
  259. AddSharedLibrary('gmon');
  260. AddSharedLibrary('c');
  261. linklibc:=true;
  262. end
  263. else
  264. begin
  265. if linklibc then
  266. prtobj:=cprtobj;
  267. end;
  268. { Open link.res file }
  269. LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
  270. { Write path to search libraries }
  271. HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
  272. while assigned(HPath) do
  273. begin
  274. LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
  275. HPath:=TStringListItem(HPath.Next);
  276. end;
  277. HPath:=TStringListItem(LibrarySearchPath.First);
  278. while assigned(HPath) do
  279. begin
  280. LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
  281. HPath:=TStringListItem(HPath.Next);
  282. end;
  283. LinkRes.Add('INPUT(');
  284. { add objectfiles, start with prt0 always }
  285. if prtobj<>'' then
  286. LinkRes.AddFileName(FindObjectFile(prtobj,'',false));
  287. { try to add crti and crtbegin if linking to C }
  288. if linklibc then
  289. begin
  290. if librarysearchpath.FindFile('crtbegin.o',s) then
  291. LinkRes.AddFileName(s);
  292. if librarysearchpath.FindFile('crti.o',s) then
  293. LinkRes.AddFileName(s);
  294. end;
  295. { main objectfiles }
  296. while not ObjectFiles.Empty do
  297. begin
  298. s:=ObjectFiles.GetFirst;
  299. if s<>'' then
  300. LinkRes.AddFileName(s);
  301. end;
  302. LinkRes.Add(')');
  303. { Write staticlibraries }
  304. if not StaticLibFiles.Empty then
  305. begin
  306. LinkRes.Add('GROUP(');
  307. While not StaticLibFiles.Empty do
  308. begin
  309. S:=StaticLibFiles.GetFirst;
  310. LinkRes.AddFileName(s)
  311. end;
  312. LinkRes.Add(')');
  313. end;
  314. { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
  315. here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
  316. if not SharedLibFiles.Empty then
  317. begin
  318. LinkRes.Add('INPUT(');
  319. While not SharedLibFiles.Empty do
  320. begin
  321. S:=SharedLibFiles.GetFirst;
  322. if s<>'c' then
  323. begin
  324. i:=Pos(target_info.sharedlibext,S);
  325. if i>0 then
  326. Delete(S,i,255);
  327. LinkRes.Add('-l'+s);
  328. end
  329. else
  330. begin
  331. linklibc:=true;
  332. linkdynamic:=false; { libc will include the ld-linux for us }
  333. end;
  334. end;
  335. { be sure that libc is the last lib }
  336. if linklibc then
  337. LinkRes.Add('-lc');
  338. { when we have -static for the linker the we also need libgcc }
  339. if (cs_link_staticflag in aktglobalswitches) then
  340. LinkRes.Add('-lgcc');
  341. if linkdynamic and (Info.DynamicLinker<>'') then
  342. LinkRes.AddFileName(Info.DynamicLinker);
  343. LinkRes.Add(')');
  344. end;
  345. { objects which must be at the end }
  346. if linklibc then
  347. begin
  348. found1:=librarysearchpath.FindFile('crtend.o',s1);
  349. found2:=librarysearchpath.FindFile('crtn.o',s2);
  350. if found1 or found2 then
  351. begin
  352. LinkRes.Add('INPUT(');
  353. if found1 then
  354. LinkRes.AddFileName(s1);
  355. if found2 then
  356. LinkRes.AddFileName(s2);
  357. LinkRes.Add(')');
  358. end;
  359. end;
  360. { Write and Close response }
  361. linkres.writetodisk;
  362. linkres.Free;
  363. WriteResponseFile:=True;
  364. end;
  365. function TLinkerLinux.MakeExecutable:boolean;
  366. var
  367. binstr,
  368. cmdstr : string;
  369. success : boolean;
  370. DynLinkStr : string[60];
  371. StaticStr,
  372. StripStr : string[40];
  373. begin
  374. if not(cs_link_extern in aktglobalswitches) then
  375. Message1(exec_i_linking,current_module.exefilename^);
  376. { Create some replacements }
  377. StaticStr:='';
  378. StripStr:='';
  379. DynLinkStr:='';
  380. if (cs_link_staticflag in aktglobalswitches) then
  381. StaticStr:='-static';
  382. if (cs_link_strip in aktglobalswitches) then
  383. StripStr:='-s';
  384. If (cs_profile in aktmoduleswitches) or
  385. ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
  386. begin
  387. DynLinkStr:='-dynamic-linker='+Info.DynamicLinker;
  388. if cshared Then
  389. DynLinkStr:='--shared ' + DynLinkStr;
  390. if rlinkpath<>'' Then
  391. DynLinkStr:='--rpath-link '+rlinkpath + ' '+ DynLinkStr;
  392. End;
  393. { Write used files and libraries }
  394. WriteResponseFile(false);
  395. { Call linker }
  396. SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
  397. Replace(cmdstr,'$EXE',current_module.exefilename^);
  398. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  399. Replace(cmdstr,'$RES',outputexedir+Info.ResName);
  400. Replace(cmdstr,'$STATIC',StaticStr);
  401. Replace(cmdstr,'$STRIP',StripStr);
  402. Replace(cmdstr,'$DYNLINK',DynLinkStr);
  403. success:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,false);
  404. { Remove ReponseFile }
  405. if (success) and not(cs_link_extern in aktglobalswitches) then
  406. RemoveFile(outputexedir+Info.ResName);
  407. MakeExecutable:=success; { otherwise a recursive call to link method }
  408. end;
  409. Function TLinkerLinux.MakeSharedLibrary:boolean;
  410. var
  411. InitStr,
  412. FiniStr,
  413. SoNameStr : string[80];
  414. binstr,
  415. cmdstr : string;
  416. success : boolean;
  417. begin
  418. MakeSharedLibrary:=false;
  419. if not(cs_link_extern in aktglobalswitches) then
  420. Message1(exec_i_linking,current_module.sharedlibfilename^);
  421. { Write used files and libraries }
  422. WriteResponseFile(true);
  423. { Create some replacements }
  424. InitStr:='-init FPC_LIB_START';
  425. FiniStr:='-fini FPC_LIB_EXIT';
  426. SoNameStr:='-soname '+SplitFileName(current_module.sharedlibfilename^);
  427. { Call linker }
  428. SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
  429. Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
  430. Replace(cmdstr,'$OPT',Info.ExtraOptions);
  431. Replace(cmdstr,'$RES',outputexedir+Info.ResName);
  432. Replace(cmdstr,'$INIT',InitStr);
  433. Replace(cmdstr,'$FINI',FiniStr);
  434. Replace(cmdstr,'$SONAME',SoNameStr);
  435. success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
  436. { Strip the library ? }
  437. if success and (cs_link_strip in aktglobalswitches) then
  438. begin
  439. SplitBinCmd(Info.DllCmd[2],binstr,cmdstr);
  440. Replace(cmdstr,'$EXE',current_module.sharedlibfilename^);
  441. success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false);
  442. end;
  443. { Remove ReponseFile }
  444. if (success) and not(cs_link_extern in aktglobalswitches) then
  445. RemoveFile(outputexedir+Info.ResName);
  446. MakeSharedLibrary:=success; { otherwise a recursive call to link method }
  447. end;
  448. {*****************************************************************************
  449. Initialize
  450. *****************************************************************************}
  451. initialization
  452. {$ifdef i386}
  453. RegisterExternalLinker(system_i386_linux_info,TLinkerLinux);
  454. RegisterImport(system_i386_linux,timportliblinux);
  455. RegisterExport(system_i386_linux,texportliblinux);
  456. RegisterTarget(system_i386_linux_info);
  457. {$endif i386}
  458. {$ifdef m68k}
  459. RegisterExternalLinker(system_m68k_linux_info,TLinkerLinux);
  460. RegisterImport(system_m68k_linux,timportliblinux);
  461. RegisterExport(system_m68k_linux,texportliblinux);
  462. RegisterTarget(system_m68k_linux_info);
  463. {$endif m68k}
  464. {$ifdef powerpc}
  465. RegisterExternalLinker(system_powerpc_linux_info,TLinkerLinux);
  466. RegisterImport(system_powerpc_linux,timportliblinux);
  467. RegisterExport(system_powerpc_linux,texportliblinux);
  468. RegisterTarget(system_powerpc_linux_info);
  469. {$endif powerpc}
  470. {$ifdef alpha}
  471. RegisterExternalLinker(system_alpha_linux_info,TLinkerLinux);
  472. RegisterImport(system_alpha_linux,timportliblinux);
  473. RegisterExport(system_alpha_linux,texportliblinux);
  474. RegisterTarget(system_alpha_linux_info);
  475. {$endif alpha}
  476. {$ifdef x86_64}
  477. RegisterExternalLinker(system_x86_64_linux_info,TLinkerLinux);
  478. RegisterImport(system_x86_64_linux,timportliblinux);
  479. RegisterExport(system_x86_64_linux,texportliblinux);
  480. RegisterTarget(system_x86_64_linux_info);
  481. {$endif x86_64}
  482. {$ifdef SPARC}
  483. RegisterExternalLinker(system_sparc_linux_info,TLinkerLinux);
  484. RegisterImport(system_SPARC_linux,timportliblinux);
  485. RegisterExport(system_SPARC_linux,texportliblinux);
  486. RegisterTarget(system_SPARC_linux_info);
  487. {$endif SPARC}
  488. {$ifdef ARM}
  489. RegisterExternalLinker(system_arm_linux_info,TLinkerLinux);
  490. RegisterImport(system_arm_linux,timportliblinux);
  491. RegisterExport(system_arm_linux,texportliblinux);
  492. RegisterTarget(system_arm_linux_info);
  493. {$endif ARM}
  494. end.
  495. {
  496. $Log$
  497. Revision 1.17 2004-03-06 20:35:20 florian
  498. * fixed arm compilation
  499. * cleaned up code generation for exported linux procedures
  500. Revision 1.16 2004/03/04 16:32:59 peter
  501. * misplaced $Ifdef
  502. Revision 1.15 2004/03/02 00:36:33 olle
  503. * big transformation of Tai_[const_]Symbol.Create[data]name*
  504. Revision 1.14 2004/01/03 13:51:05 jonas
  505. + support exported procedures for linuxppc
  506. * refuse to compile systems/t_linux.pas if processor-specific support
  507. for exported procedures is absent
  508. + generate .type and .size info for all currently defined linux-variants
  509. in aggas.pas
  510. Revision 1.13 2004/01/01 15:34:50 jonas
  511. * default linker name for non-i386 and non-m68k
  512. Revision 1.12 2003/10/30 18:35:30 marco
  513. * librarysuffix + profiling
  514. Revision 1.11 2003/10/11 19:32:04 marco
  515. * -Xd
  516. Revision 1.10 2003/10/03 14:16:48 marco
  517. * -XP<prefix> support
  518. Revision 1.9 2003/07/21 11:52:57 florian
  519. * very basic stuff for the arm
  520. Revision 1.8 2003/04/27 07:29:52 peter
  521. * aktprocdef cleanup, aktprocdef is now always nil when parsing
  522. a new procdef declaration
  523. * aktprocsym removed
  524. * lexlevel removed, use symtable.symtablelevel instead
  525. * implicit init/final code uses the normal genentry/genexit
  526. * funcret state checking updated for new funcret handling
  527. Revision 1.7 2003/04/26 09:16:08 peter
  528. * .o files belonging to the unit are first searched in the same dir
  529. as the .ppu
  530. Revision 1.6 2002/12/14 13:02:45 carl
  531. - remove extra ifdef i386 (avoir compilation errors)
  532. Revision 1.5 2002/12/06 17:51:43 peter
  533. * m68k library support
  534. Revision 1.4 2002/11/17 16:32:04 carl
  535. * memory optimization (3-4%) : cleanup of tai fields,
  536. cleanup of tdef and tsym fields.
  537. * make it work for m68k
  538. Revision 1.3 2002/11/15 01:59:02 peter
  539. * merged changes from 1.0.7 up to 04-11
  540. - -V option for generating bug report tracing
  541. - more tracing for option parsing
  542. - errors for cdecl and high()
  543. - win32 import stabs
  544. - win32 records<=8 are returned in eax:edx (turned off by default)
  545. - heaptrc update
  546. - more info for temp management in .s file with EXTDEBUG
  547. Revision 1.2 2002/09/09 17:34:17 peter
  548. * tdicationary.replace added to replace and item in a dictionary. This
  549. is only allowed for the same name
  550. * varsyms are inserted in symtable before the types are parsed. This
  551. fixes the long standing "var longint : longint" bug
  552. - consume_idlist and idstringlist removed. The loops are inserted
  553. at the callers place and uses the symtable for duplicate id checking
  554. Revision 1.1 2002/09/06 15:03:51 carl
  555. * moved files to systems directory
  556. Revision 1.33 2002/09/03 16:26:28 daniel
  557. * Make Tprocdef.defs protected
  558. Revision 1.32 2002/08/12 15:08:44 carl
  559. + stab register indexes for powerpc (moved from gdb to cpubase)
  560. + tprocessor enumeration moved to cpuinfo
  561. + linker in target_info is now a class
  562. * many many updates for m68k (will soon start to compile)
  563. - removed some ifdef or correct them for correct cpu
  564. Revision 1.31 2002/08/11 14:32:32 peter
  565. * renamed current_library to objectlibrary
  566. Revision 1.30 2002/08/11 13:24:19 peter
  567. * saving of asmsymbols in ppu supported
  568. * asmsymbollist global is removed and moved into a new class
  569. tasmlibrarydata that will hold the info of a .a file which
  570. corresponds with a single module. Added librarydata to tmodule
  571. to keep the library info stored for the module. In the future the
  572. objectfiles will also be stored to the tasmlibrarydata class
  573. * all getlabel/newasmsymbol and friends are moved to the new class
  574. Revision 1.29 2002/07/26 21:15:46 florian
  575. * rewrote the system handling
  576. Revision 1.28 2002/07/04 20:43:02 florian
  577. * first x86-64 patches
  578. Revision 1.27 2002/07/01 18:46:35 peter
  579. * internal linker
  580. * reorganized aasm layer
  581. Revision 1.26 2002/05/18 13:34:26 peter
  582. * readded missing revisions
  583. Revision 1.25 2002/05/16 19:46:53 carl
  584. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  585. + try to fix temp allocation (still in ifdef)
  586. + generic constructor calls
  587. + start of tassembler / tmodulebase class cleanup
  588. Revision 1.22 2002/05/06 19:46:36 carl
  589. + added more patches from Mazen for SPARC port
  590. Revision 1.21 2002/04/22 18:19:22 carl
  591. - remove use_bound_instruction field
  592. Revision 1.20 2002/04/20 21:43:18 carl
  593. * fix stack size for some targets
  594. + add offset to parameters from frame pointer info.
  595. - remove some unused stuff
  596. Revision 1.19 2002/04/19 15:46:05 peter
  597. * mangledname rewrite, tprocdef.mangledname is now created dynamicly
  598. in most cases and not written to the ppu
  599. * add mangeledname_prefix() routine to generate the prefix of
  600. manglednames depending on the current procedure, object and module
  601. * removed static procprefix since the mangledname is now build only
  602. on demand from tprocdef.mangledname
  603. Revision 1.18 2002/04/15 19:44:23 peter
  604. * fixed stackcheck that would be called recursively when a stack
  605. error was found
  606. * generic changeregsize(reg,size) for i386 register resizing
  607. * removed some more routines from cga unit
  608. * fixed returnvalue handling
  609. * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
  610. Revision 1.17 2002/04/15 19:16:57 carl
  611. - remove size_of_pointer field
  612. Revision 1.16 2002/01/29 21:27:34 peter
  613. * default alignment changed to 4 bytes for locals and static const,var
  614. Revision 1.15 2002/01/09 07:38:37 michael
  615. + Patch from Peter for library imports
  616. }