i_bsd.pas 17 KB

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