t_linux.pas 19 KB

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