i_bsd.pas 19 KB

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