i_bsd.pas 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Peter Vreman
  4. This unit implements support information structures for FreeBSD/NetBSD
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. { This unit implements support information structures for FreeBSD/NetBSD.
  19. OpenBSD is only added for i386 for now, though it exists for most
  20. other common CPU's too}
  21. unit i_bsd;
  22. interface
  23. uses
  24. systems;
  25. const
  26. system_i386_freebsd_info : tsysteminfo =
  27. (
  28. system : system_i386_FreeBSD;
  29. name : 'FreeBSD/ELF for i386';
  30. shortname : 'FreeBSD';
  31. flags : [tf_pic_uses_got];
  32. cpu : cpu_i386;
  33. unit_env : 'BSDUNITS';
  34. extradefines : 'UNIX;BSD;HASUNIX';
  35. sourceext : '.pp';
  36. pasext : '.pas';
  37. exeext : '';
  38. defext : '.def';
  39. scriptext : '.sh';
  40. smartext : '.sl';
  41. unitext : '.ppu';
  42. unitlibext : '.ppl';
  43. asmext : '.s';
  44. objext : '.o';
  45. resext : '.res';
  46. resobjext : '.or';
  47. sharedlibext : '.so';
  48. staticlibext : '.a';
  49. staticlibprefix : 'libp';
  50. sharedlibprefix : 'lib';
  51. sharedClibext : '.so';
  52. staticClibext : '.a';
  53. staticClibprefix : 'lib';
  54. sharedClibprefix : 'lib';
  55. Cprefix : '';
  56. newline : #10;
  57. dirsep : '/';
  58. files_case_relevent : true;
  59. assem : as_i386_elf32;
  60. assemextern : as_gas;
  61. link : nil;
  62. linkextern : nil;
  63. ar : ar_gnu_ar;
  64. res : res_none;
  65. script : script_unix;
  66. endian : endian_little;
  67. alignment :
  68. (
  69. procalign : 4;
  70. loopalign : 4;
  71. jumpalign : 0;
  72. constalignmin : 0;
  73. constalignmax : 4;
  74. varalignmin : 0;
  75. varalignmax : 4;
  76. localalignmin : 0;
  77. localalignmax : 4;
  78. recordalignmin : 0;
  79. recordalignmax : 2;
  80. maxCrecordalign : 4
  81. );
  82. first_parm_offset : 8;
  83. stacksize : 262144;
  84. DllScanSupported:false;
  85. use_function_relative_addresses : true
  86. );
  87. system_x86_64_freebsd_info : tsysteminfo =
  88. (
  89. system : system_x86_64_freebsd;
  90. name : 'FreeBSD for x86-64';
  91. shortname : 'FreeBSD';
  92. flags : [tf_needs_symbol_size,tf_pic_uses_got{,tf_smartlink_sections}];
  93. cpu : cpu_x86_64;
  94. unit_env : 'BSDUNITS';
  95. extradefines : 'UNIX;HASUNIX';
  96. sourceext : '.pp';
  97. pasext : '.pas';
  98. exeext : '';
  99. defext : '.def';
  100. scriptext : '.sh';
  101. smartext : '.sl';
  102. unitext : '.ppu';
  103. unitlibext : '.ppl';
  104. asmext : '.s';
  105. objext : '.o';
  106. resext : '.res';
  107. resobjext : '.or';
  108. sharedlibext : '.so';
  109. staticlibext : '.a';
  110. staticlibprefix : 'libp';
  111. sharedlibprefix : 'lib';
  112. sharedClibext : '.so';
  113. staticClibext : '.a';
  114. staticClibprefix : 'lib';
  115. sharedClibprefix : 'lib';
  116. Cprefix : '';
  117. newline : #10;
  118. dirsep : '/';
  119. files_case_relevent : true;
  120. assem : as_gas;
  121. assemextern : as_gas;
  122. link : nil;
  123. linkextern : nil;
  124. ar : ar_gnu_ar;
  125. res : res_none;
  126. script : script_unix;
  127. endian : endian_little;
  128. alignment :
  129. (
  130. procalign : 8;
  131. loopalign : 4;
  132. jumpalign : 0;
  133. constalignmin : 0;
  134. constalignmax : 8;
  135. varalignmin : 0;
  136. varalignmax : 8;
  137. localalignmin : 4;
  138. localalignmax : 8;
  139. recordalignmin : 0;
  140. recordalignmax : 8;
  141. maxCrecordalign : 8
  142. );
  143. first_parm_offset : 16;
  144. stacksize : 256*1024;
  145. DllScanSupported:false;
  146. use_function_relative_addresses : true
  147. );
  148. system_i386_netbsd_info : tsysteminfo =
  149. (
  150. system : system_i386_NetBSD;
  151. name : 'NetBSD for i386';
  152. shortname : 'NetBSD';
  153. flags : [tf_under_development];
  154. cpu : cpu_i386;
  155. unit_env : 'BSDUNITS';
  156. extradefines : 'UNIX;BSD;HASUNIX';
  157. sourceext : '.pp';
  158. pasext : '.pas';
  159. exeext : '';
  160. defext : '.def';
  161. scriptext : '.sh';
  162. smartext : '.sl';
  163. unitext : '.ppu';
  164. unitlibext : '.ppl';
  165. asmext : '.s';
  166. objext : '.o';
  167. resext : '.res';
  168. resobjext : '.or';
  169. sharedlibext : '.so';
  170. staticlibext : '.a';
  171. staticlibprefix : 'libp';
  172. sharedlibprefix : 'lib';
  173. sharedClibext : '.so';
  174. staticClibext : '.a';
  175. staticClibprefix : 'lib';
  176. sharedClibprefix : 'lib';
  177. Cprefix : '_';
  178. newline : #10;
  179. dirsep : '/';
  180. files_case_relevent : true;
  181. assem : as_gas;
  182. assemextern : as_gas;
  183. link : nil;
  184. linkextern : nil;
  185. ar : ar_gnu_ar;
  186. res : res_none;
  187. script : script_unix;
  188. endian : endian_little;
  189. alignment :
  190. (
  191. procalign : 4;
  192. loopalign : 4;
  193. jumpalign : 0;
  194. constalignmin : 0;
  195. constalignmax : 1;
  196. varalignmin : 0;
  197. varalignmax : 1;
  198. localalignmin : 0;
  199. localalignmax : 1;
  200. recordalignmin : 0;
  201. recordalignmax : 2;
  202. maxCrecordalign : 4
  203. );
  204. first_parm_offset : 8;
  205. stacksize : 262144;
  206. DllScanSupported:false;
  207. use_function_relative_addresses : true
  208. );
  209. system_i386_openbsd_info : tsysteminfo =
  210. (
  211. system : system_i386_OpenBSD;
  212. name : 'OpenBSD for i386';
  213. shortname : 'OpenBSD';
  214. flags : [tf_under_development];
  215. cpu : cpu_i386;
  216. unit_env : 'BSDUNITS';
  217. extradefines : 'UNIX;BSD;HASUNIX';
  218. sourceext : '.pp';
  219. pasext : '.pas';
  220. exeext : '';
  221. defext : '.def';
  222. scriptext : '.sh';
  223. smartext : '.sl';
  224. unitext : '.ppu';
  225. unitlibext : '.ppl';
  226. asmext : '.s';
  227. objext : '.o';
  228. resext : '.res';
  229. resobjext : '.or';
  230. sharedlibext : '.so';
  231. staticlibext : '.a';
  232. staticlibprefix : 'libp';
  233. sharedlibprefix : 'lib';
  234. sharedClibext : '.so';
  235. staticClibext : '.a';
  236. staticClibprefix : 'lib';
  237. sharedClibprefix : 'lib';
  238. Cprefix : '_';
  239. newline : #10;
  240. dirsep : '/';
  241. files_case_relevent : true;
  242. assem : as_gas;
  243. assemextern : as_gas;
  244. link : nil;
  245. linkextern : nil;
  246. ar : ar_gnu_ar;
  247. res : res_none;
  248. script : script_unix;
  249. endian : endian_little;
  250. alignment :
  251. (
  252. procalign : 4;
  253. loopalign : 4;
  254. jumpalign : 0;
  255. constalignmin : 0;
  256. constalignmax : 1;
  257. varalignmin : 0;
  258. varalignmax : 1;
  259. localalignmin : 0;
  260. localalignmax : 1;
  261. recordalignmin : 0;
  262. recordalignmax : 2;
  263. maxCrecordalign : 4
  264. );
  265. first_parm_offset : 8;
  266. stacksize : 262144;
  267. DllScanSupported:false;
  268. use_function_relative_addresses : true
  269. );
  270. system_m68k_netbsd_info : tsysteminfo =
  271. (
  272. system : system_m68k_NetBSD;
  273. name : 'NetBSD for m68k';
  274. shortname : 'NetBSD';
  275. flags : [tf_under_development];
  276. cpu : cpu_m68k;
  277. unit_env : 'BSDUNITS';
  278. extradefines : 'UNIX;BSD;HASUNIX';
  279. sourceext : '.pp';
  280. pasext : '.pas';
  281. exeext : '';
  282. defext : '.def';
  283. scriptext : '.sh';
  284. smartext : '.sl';
  285. unitext : '.ppu';
  286. unitlibext : '.ppl';
  287. asmext : '.s';
  288. objext : '.o';
  289. resext : '.res';
  290. resobjext : '.or';
  291. sharedlibext : '.so';
  292. staticlibext : '.a';
  293. staticlibprefix : 'libp';
  294. sharedlibprefix : 'lib';
  295. sharedClibext : '.so';
  296. staticClibext : '.a';
  297. staticClibprefix : 'lib';
  298. sharedClibprefix : 'lib';
  299. Cprefix : '';
  300. newline : #10;
  301. dirsep : '/';
  302. files_case_relevent : true;
  303. assem : as_gas;
  304. assemextern : as_gas;
  305. link : nil;
  306. linkextern : nil;
  307. ar : ar_gnu_ar;
  308. res : res_none;
  309. script : script_unix;
  310. endian : endian_big;
  311. alignment :
  312. (
  313. procalign : 4;
  314. loopalign : 4;
  315. jumpalign : 0;
  316. constalignmin : 0;
  317. constalignmax : 1;
  318. varalignmin : 0;
  319. varalignmax : 1;
  320. localalignmin : 0;
  321. localalignmax : 1;
  322. recordalignmin : 0;
  323. recordalignmax : 2;
  324. maxCrecordalign : 4
  325. );
  326. first_parm_offset : 8;
  327. stacksize : 262144;
  328. DllScanSupported:false;
  329. use_function_relative_addresses : true
  330. );
  331. system_powerpc_netbsd_info : tsysteminfo =
  332. (
  333. system : system_powerpc_netbsd;
  334. name : 'NetBSD for PowerPC';
  335. shortname : 'NetBSD';
  336. flags : [tf_under_development];
  337. cpu : cpu_powerpc;
  338. unit_env : '';
  339. extradefines : 'UNIX;BSD;HASUNIX';
  340. sourceext : '.pp';
  341. pasext : '.pas';
  342. exeext : '';
  343. defext : '.def';
  344. scriptext : '.sh';
  345. smartext : '.sl';
  346. unitext : '.ppu';
  347. unitlibext : '.ppl';
  348. asmext : '.s';
  349. objext : '.o';
  350. resext : '.res';
  351. resobjext : '.or';
  352. sharedlibext : '.so';
  353. staticlibext : '.s';
  354. staticlibprefix : 'libp';
  355. sharedlibprefix : 'lib';
  356. sharedClibext : '.so';
  357. staticClibext : '.a';
  358. staticClibprefix : 'lib';
  359. sharedClibprefix : 'lib';
  360. Cprefix : '';
  361. newline : #10;
  362. dirsep : '/';
  363. files_case_relevent : true;
  364. assem : as_gas;
  365. assemextern : as_gas;
  366. link : nil;
  367. linkextern : nil;
  368. ar : ar_gnu_ar;
  369. res : res_none;
  370. script : script_unix;
  371. endian : endian_big;
  372. alignment :
  373. (
  374. procalign : 4;
  375. loopalign : 4;
  376. jumpalign : 0;
  377. constalignmin : 0;
  378. constalignmax : 4;
  379. varalignmin : 0;
  380. varalignmax : 4;
  381. localalignmin : 0;
  382. localalignmax : 4;
  383. recordalignmin : 0;
  384. recordalignmax : 2;
  385. maxCrecordalign : 4 // should be 8 probably
  386. );
  387. first_parm_offset : 8;
  388. stacksize : 32*1024*1024;
  389. DllScanSupported:false;
  390. use_function_relative_addresses : true;
  391. { abi_powerpc_sysv doesn't work yet }
  392. abi : abi_powerpc_aix;
  393. );
  394. system_powerpc_darwin_info : tsysteminfo =
  395. (
  396. system : system_powerpc_darwin;
  397. name : 'Darwin for PowerPC';
  398. shortname : 'Darwin';
  399. flags : [];
  400. cpu : cpu_powerpc;
  401. unit_env : 'BSDUNITS';
  402. extradefines : 'UNIX;BSD;HASUNIX';
  403. sourceext : '.pp';
  404. pasext : '.pas';
  405. exeext : '';
  406. defext : '.def';
  407. scriptext : '.sh';
  408. smartext : '.sl';
  409. unitext : '.ppu';
  410. unitlibext : '.ppl';
  411. asmext : '.s';
  412. objext : '.o';
  413. resext : '.res';
  414. resobjext : '.or';
  415. sharedlibext : '.dylib';
  416. staticlibext : '.a';
  417. staticlibprefix : 'libp';
  418. sharedlibprefix : 'lib';
  419. sharedClibext : '.dylib';
  420. staticClibext : '.a';
  421. staticClibprefix : 'lib';
  422. sharedClibprefix : 'lib';
  423. Cprefix : '_';
  424. newline : #10;
  425. dirsep : '/';
  426. files_case_relevent : true;
  427. assem : as_darwin;
  428. assemextern : as_darwin;
  429. link : nil;
  430. linkextern : nil;
  431. ar : ar_gnu_ar;
  432. res : res_none;
  433. script : script_unix;
  434. endian : endian_big;
  435. alignment :
  436. (
  437. procalign : 16;
  438. loopalign : 4;
  439. jumpalign : 0;
  440. constalignmin : 0;
  441. constalignmax : 4;
  442. varalignmin : 0;
  443. varalignmax : 4;
  444. localalignmin : 0;
  445. localalignmax : 4;
  446. recordalignmin : 0;
  447. recordalignmax : 2;
  448. maxCrecordalign : 4
  449. );
  450. first_parm_offset : 24;
  451. stacksize : 262144;
  452. DllScanSupported:false;
  453. use_function_relative_addresses : false;
  454. abi : abi_powerpc_aix;
  455. );
  456. implementation
  457. initialization
  458. {$ifdef cpu86}
  459. {$ifdef FreeBSD}
  460. set_source_info(system_i386_FreeBSD_info);
  461. {$endif}
  462. {$ifdef NetBSD}
  463. set_source_info(system_i386_NetBSD_info);
  464. {$endif}
  465. {$ifdef OpenBSD}
  466. set_source_info(system_i386_NetBSD_info);
  467. {$endif}
  468. {$endif cpu86}
  469. {$ifdef cpux86_64}
  470. {$ifdef FreeBSD}
  471. set_source_info(system_x86_64_FreeBSD_info);
  472. {$endif}
  473. {$endif}
  474. {$ifdef cpu68}
  475. {$ifdef NetBSD}
  476. set_source_info(system_m68k_NetBSD_info);
  477. {$endif NetBSD}
  478. {$endif cpu68}
  479. {$ifdef cpupowerpc}
  480. {$ifdef Darwin}
  481. set_source_info(system_powerpc_darwin_info);
  482. {$endif Darwin}
  483. {$ifdef NetBSD}
  484. set_source_info(system_powerpc_netbsd_info);
  485. {$endif}
  486. {$endif cpu68}
  487. end.
  488. {
  489. $Log$
  490. Revision 1.15 2005-01-25 18:48:15 peter
  491. * tf_pic_uses_got added
  492. Revision 1.14 2004/10/25 15:38:41 peter
  493. * heap and heapsize removed
  494. * checkpointer fixes
  495. Revision 1.13 2004/09/12 20:33:21 olle
  496. * Updated compiler status
  497. Revision 1.12 2004/06/20 08:55:32 florian
  498. * logs truncated
  499. Revision 1.11 2004/06/16 20:07:11 florian
  500. * dwarf branch merged
  501. Revision 1.10.2.1 2004/05/11 17:07:55 marco
  502. * x86_64 freebsd target support
  503. Revision 1.10 2004/03/29 21:17:39 florian
  504. * fixed dyn. lib extension on darwin
  505. Revision 1.9 2004/02/08 20:03:05 jonas
  506. * corrected first_param_offset for darwin
  507. Revision 1.8 2004/01/29 15:48:10 marco
  508. * fix added as comment till I can test (8 byte C alignment on netbsd/ppc)
  509. }