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 : [];
  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. heapsize : 256*1024;
  84. stacksize : 262144;
  85. DllScanSupported:false;
  86. use_function_relative_addresses : true
  87. );
  88. system_x86_64_freebsd_info : tsysteminfo =
  89. (
  90. system : system_x86_64_freebsd;
  91. name : 'FreeBSD for x86-64';
  92. shortname : 'FreeBSD';
  93. flags : [tf_needs_symbol_size,tf_smartlink_sections];
  94. cpu : cpu_x86_64;
  95. unit_env : 'BSDUNITS';
  96. extradefines : 'UNIX;HASUNIX';
  97. sourceext : '.pp';
  98. pasext : '.pas';
  99. exeext : '';
  100. defext : '.def';
  101. scriptext : '.sh';
  102. smartext : '.sl';
  103. unitext : '.ppu';
  104. unitlibext : '.ppl';
  105. asmext : '.s';
  106. objext : '.o';
  107. resext : '.res';
  108. resobjext : '.or';
  109. sharedlibext : '.so';
  110. staticlibext : '.a';
  111. staticlibprefix : 'libp';
  112. sharedlibprefix : 'lib';
  113. sharedClibext : '.so';
  114. staticClibext : '.a';
  115. staticClibprefix : 'lib';
  116. sharedClibprefix : 'lib';
  117. Cprefix : '';
  118. newline : #10;
  119. dirsep : '/';
  120. files_case_relevent : true;
  121. assem : as_gas;
  122. assemextern : as_gas;
  123. link : nil;
  124. linkextern : nil;
  125. ar : ar_gnu_ar;
  126. res : res_none;
  127. script : script_unix;
  128. endian : endian_little;
  129. alignment :
  130. (
  131. procalign : 8;
  132. loopalign : 4;
  133. jumpalign : 0;
  134. constalignmin : 0;
  135. constalignmax : 8;
  136. varalignmin : 0;
  137. varalignmax : 8;
  138. localalignmin : 4;
  139. localalignmax : 8;
  140. recordalignmin : 0;
  141. recordalignmax : 8;
  142. maxCrecordalign : 8
  143. );
  144. first_parm_offset : 16;
  145. heapsize : 256*1024;
  146. stacksize : 256*1024;
  147. DllScanSupported:false;
  148. use_function_relative_addresses : true
  149. );
  150. system_i386_netbsd_info : tsysteminfo =
  151. (
  152. system : system_i386_NetBSD;
  153. name : 'NetBSD for i386';
  154. shortname : 'NetBSD';
  155. flags : [tf_under_development];
  156. cpu : cpu_i386;
  157. unit_env : 'BSDUNITS';
  158. extradefines : 'UNIX;BSD;HASUNIX';
  159. sourceext : '.pp';
  160. pasext : '.pas';
  161. exeext : '';
  162. defext : '.def';
  163. scriptext : '.sh';
  164. smartext : '.sl';
  165. unitext : '.ppu';
  166. unitlibext : '.ppl';
  167. asmext : '.s';
  168. objext : '.o';
  169. resext : '.res';
  170. resobjext : '.or';
  171. sharedlibext : '.so';
  172. staticlibext : '.a';
  173. staticlibprefix : 'libp';
  174. sharedlibprefix : 'lib';
  175. sharedClibext : '.so';
  176. staticClibext : '.a';
  177. staticClibprefix : 'lib';
  178. sharedClibprefix : 'lib';
  179. Cprefix : '_';
  180. newline : #10;
  181. dirsep : '/';
  182. files_case_relevent : true;
  183. assem : as_gas;
  184. assemextern : as_gas;
  185. link : nil;
  186. linkextern : nil;
  187. ar : ar_gnu_ar;
  188. res : res_none;
  189. script : script_unix;
  190. endian : endian_little;
  191. alignment :
  192. (
  193. procalign : 4;
  194. loopalign : 4;
  195. jumpalign : 0;
  196. constalignmin : 0;
  197. constalignmax : 1;
  198. varalignmin : 0;
  199. varalignmax : 1;
  200. localalignmin : 0;
  201. localalignmax : 1;
  202. recordalignmin : 0;
  203. recordalignmax : 2;
  204. maxCrecordalign : 4
  205. );
  206. first_parm_offset : 8;
  207. heapsize : 256*1024;
  208. stacksize : 262144;
  209. DllScanSupported:false;
  210. use_function_relative_addresses : true
  211. );
  212. system_i386_openbsd_info : tsysteminfo =
  213. (
  214. system : system_i386_OpenBSD;
  215. name : 'OpenBSD for i386';
  216. shortname : 'OpenBSD';
  217. flags : [tf_under_development];
  218. cpu : cpu_i386;
  219. unit_env : 'BSDUNITS';
  220. extradefines : 'UNIX;BSD;HASUNIX';
  221. sourceext : '.pp';
  222. pasext : '.pas';
  223. exeext : '';
  224. defext : '.def';
  225. scriptext : '.sh';
  226. smartext : '.sl';
  227. unitext : '.ppu';
  228. unitlibext : '.ppl';
  229. asmext : '.s';
  230. objext : '.o';
  231. resext : '.res';
  232. resobjext : '.or';
  233. sharedlibext : '.so';
  234. staticlibext : '.a';
  235. staticlibprefix : 'libp';
  236. sharedlibprefix : 'lib';
  237. sharedClibext : '.so';
  238. staticClibext : '.a';
  239. staticClibprefix : 'lib';
  240. sharedClibprefix : 'lib';
  241. Cprefix : '_';
  242. newline : #10;
  243. dirsep : '/';
  244. files_case_relevent : true;
  245. assem : as_gas;
  246. assemextern : as_gas;
  247. link : nil;
  248. linkextern : nil;
  249. ar : ar_gnu_ar;
  250. res : res_none;
  251. script : script_unix;
  252. endian : endian_little;
  253. alignment :
  254. (
  255. procalign : 4;
  256. loopalign : 4;
  257. jumpalign : 0;
  258. constalignmin : 0;
  259. constalignmax : 1;
  260. varalignmin : 0;
  261. varalignmax : 1;
  262. localalignmin : 0;
  263. localalignmax : 1;
  264. recordalignmin : 0;
  265. recordalignmax : 2;
  266. maxCrecordalign : 4
  267. );
  268. first_parm_offset : 8;
  269. heapsize : 256*1024;
  270. stacksize : 262144;
  271. DllScanSupported:false;
  272. use_function_relative_addresses : true
  273. );
  274. system_m68k_netbsd_info : tsysteminfo =
  275. (
  276. system : system_m68k_NetBSD;
  277. name : 'NetBSD for m68k';
  278. shortname : 'NetBSD';
  279. flags : [tf_under_development];
  280. cpu : cpu_m68k;
  281. unit_env : 'BSDUNITS';
  282. extradefines : 'UNIX;BSD;HASUNIX';
  283. sourceext : '.pp';
  284. pasext : '.pas';
  285. exeext : '';
  286. defext : '.def';
  287. scriptext : '.sh';
  288. smartext : '.sl';
  289. unitext : '.ppu';
  290. unitlibext : '.ppl';
  291. asmext : '.s';
  292. objext : '.o';
  293. resext : '.res';
  294. resobjext : '.or';
  295. sharedlibext : '.so';
  296. staticlibext : '.a';
  297. staticlibprefix : 'libp';
  298. sharedlibprefix : 'lib';
  299. sharedClibext : '.so';
  300. staticClibext : '.a';
  301. staticClibprefix : 'lib';
  302. sharedClibprefix : 'lib';
  303. Cprefix : '';
  304. newline : #10;
  305. dirsep : '/';
  306. files_case_relevent : true;
  307. assem : as_gas;
  308. assemextern : as_gas;
  309. link : nil;
  310. linkextern : nil;
  311. ar : ar_gnu_ar;
  312. res : res_none;
  313. script : script_unix;
  314. endian : endian_big;
  315. alignment :
  316. (
  317. procalign : 4;
  318. loopalign : 4;
  319. jumpalign : 0;
  320. constalignmin : 0;
  321. constalignmax : 1;
  322. varalignmin : 0;
  323. varalignmax : 1;
  324. localalignmin : 0;
  325. localalignmax : 1;
  326. recordalignmin : 0;
  327. recordalignmax : 2;
  328. maxCrecordalign : 4
  329. );
  330. first_parm_offset : 8;
  331. heapsize : 256*1024;
  332. stacksize : 262144;
  333. DllScanSupported:false;
  334. use_function_relative_addresses : true
  335. );
  336. system_powerpc_netbsd_info : tsysteminfo =
  337. (
  338. system : system_powerpc_netbsd;
  339. name : 'NetBSD for PowerPC';
  340. shortname : 'NetBSD';
  341. flags : [tf_under_development];
  342. cpu : cpu_powerpc;
  343. unit_env : '';
  344. extradefines : 'UNIX;BSD;HASUNIX';
  345. sourceext : '.pp';
  346. pasext : '.pas';
  347. exeext : '';
  348. defext : '.def';
  349. scriptext : '.sh';
  350. smartext : '.sl';
  351. unitext : '.ppu';
  352. unitlibext : '.ppl';
  353. asmext : '.s';
  354. objext : '.o';
  355. resext : '.res';
  356. resobjext : '.or';
  357. sharedlibext : '.so';
  358. staticlibext : '.s';
  359. staticlibprefix : 'libp';
  360. sharedlibprefix : 'lib';
  361. sharedClibext : '.so';
  362. staticClibext : '.a';
  363. staticClibprefix : 'lib';
  364. sharedClibprefix : 'lib';
  365. Cprefix : '';
  366. newline : #10;
  367. dirsep : '/';
  368. files_case_relevent : true;
  369. assem : as_gas;
  370. assemextern : as_gas;
  371. link : nil;
  372. linkextern : nil;
  373. ar : ar_gnu_ar;
  374. res : res_none;
  375. script : script_unix;
  376. endian : endian_big;
  377. alignment :
  378. (
  379. procalign : 4;
  380. loopalign : 4;
  381. jumpalign : 0;
  382. constalignmin : 0;
  383. constalignmax : 4;
  384. varalignmin : 0;
  385. varalignmax : 4;
  386. localalignmin : 0;
  387. localalignmax : 4;
  388. recordalignmin : 0;
  389. recordalignmax : 2;
  390. maxCrecordalign : 4 // should be 8 probably
  391. );
  392. first_parm_offset : 8;
  393. heapsize : 256*1024;
  394. stacksize : 32*1024*1024;
  395. DllScanSupported:false;
  396. use_function_relative_addresses : true;
  397. { abi_powerpc_sysv doesn't work yet }
  398. abi : abi_powerpc_aix;
  399. );
  400. system_powerpc_darwin_info : tsysteminfo =
  401. (
  402. system : system_powerpc_darwin;
  403. name : 'Darwin for PowerPC';
  404. shortname : 'Darwin';
  405. flags : [];
  406. cpu : cpu_powerpc;
  407. unit_env : 'BSDUNITS';
  408. extradefines : 'UNIX;BSD;HASUNIX';
  409. sourceext : '.pp';
  410. pasext : '.pas';
  411. exeext : '';
  412. defext : '.def';
  413. scriptext : '.sh';
  414. smartext : '.sl';
  415. unitext : '.ppu';
  416. unitlibext : '.ppl';
  417. asmext : '.s';
  418. objext : '.o';
  419. resext : '.res';
  420. resobjext : '.or';
  421. sharedlibext : '.dylib';
  422. staticlibext : '.a';
  423. staticlibprefix : 'libp';
  424. sharedlibprefix : 'lib';
  425. sharedClibext : '.dylib';
  426. staticClibext : '.a';
  427. staticClibprefix : 'lib';
  428. sharedClibprefix : 'lib';
  429. Cprefix : '_';
  430. newline : #10;
  431. dirsep : '/';
  432. files_case_relevent : true;
  433. assem : as_darwin;
  434. assemextern : as_darwin;
  435. link : nil;
  436. linkextern : nil;
  437. ar : ar_gnu_ar;
  438. res : res_none;
  439. script : script_unix;
  440. endian : endian_big;
  441. alignment :
  442. (
  443. procalign : 16;
  444. loopalign : 4;
  445. jumpalign : 0;
  446. constalignmin : 0;
  447. constalignmax : 4;
  448. varalignmin : 0;
  449. varalignmax : 4;
  450. localalignmin : 0;
  451. localalignmax : 4;
  452. recordalignmin : 0;
  453. recordalignmax : 2;
  454. maxCrecordalign : 4
  455. );
  456. first_parm_offset : 24;
  457. heapsize : 256*1024;
  458. stacksize : 262144;
  459. DllScanSupported:false;
  460. use_function_relative_addresses : false;
  461. abi : abi_powerpc_aix;
  462. );
  463. implementation
  464. initialization
  465. {$ifdef cpu86}
  466. {$ifdef FreeBSD}
  467. set_source_info(system_i386_FreeBSD_info);
  468. {$endif}
  469. {$ifdef NetBSD}
  470. set_source_info(system_i386_NetBSD_info);
  471. {$endif}
  472. {$ifdef OpenBSD}
  473. set_source_info(system_i386_NetBSD_info);
  474. {$endif}
  475. {$endif cpu86}
  476. {$ifdef cpux86_64}
  477. {$ifdef FreeBSD}
  478. set_source_info(system_x86_64_FreeBSD_info);
  479. {$endif}
  480. {$endif}
  481. {$ifdef cpu68}
  482. {$ifdef NetBSD}
  483. set_source_info(system_m68k_NetBSD_info);
  484. {$endif NetBSD}
  485. {$endif cpu68}
  486. {$ifdef cpupowerpc}
  487. {$ifdef Darwin}
  488. set_source_info(system_powerpc_darwin_info);
  489. {$endif Darwin}
  490. {$ifdef NetBSD}
  491. set_source_info(system_powerpc_netbsd_info);
  492. {$endif}
  493. {$endif cpu68}
  494. end.
  495. {
  496. $Log$
  497. Revision 1.13 2004-09-12 20:33:21 olle
  498. * Updated compiler status
  499. Revision 1.12 2004/06/20 08:55:32 florian
  500. * logs truncated
  501. Revision 1.11 2004/06/16 20:07:11 florian
  502. * dwarf branch merged
  503. Revision 1.10.2.1 2004/05/11 17:07:55 marco
  504. * x86_64 freebsd target support
  505. Revision 1.10 2004/03/29 21:17:39 florian
  506. * fixed dyn. lib extension on darwin
  507. Revision 1.9 2004/02/08 20:03:05 jonas
  508. * corrected first_param_offset for darwin
  509. Revision 1.8 2004/01/29 15:48:10 marco
  510. * fix added as comment till I can test (8 byte C alignment on netbsd/ppc)
  511. }