i_linux.pas 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999
  1. {
  2. Copyright (c) 1998-2008 by Peter Vreman
  3. This unit implements support information structures for linux
  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 linux. }
  18. unit i_linux;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. systems, rescmn;
  23. const
  24. system_i386_linux_info : tsysteminfo =
  25. (
  26. system : system_i386_LINUX;
  27. name : 'Linux for i386';
  28. shortname : 'Linux';
  29. flags : [tf_needs_symbol_size,tf_pic_uses_got,tf_smartlink_sections{,tf_winlikewidestring},
  30. {$ifdef segment_threadvars}
  31. tf_section_threadvars,
  32. {$endif segment_threadvars}
  33. tf_needs_symbol_type,tf_files_case_sensitive,
  34. tf_smartlink_library,tf_needs_dwarf_cfi,tf_has_winlike_resources,
  35. tf_safecall_exceptions, tf_safecall_clearstack,tf_supports_packages];
  36. cpu : cpu_i386;
  37. unit_env : 'LINUXUNITS';
  38. extradefines : 'UNIX;HASUNIX';
  39. exeext : '';
  40. defext : '.def';
  41. scriptext : '.sh';
  42. smartext : '.sl';
  43. unitext : '.ppu';
  44. unitlibext : '.ppl';
  45. asmext : '.s';
  46. objext : '.o';
  47. resext : '.res';
  48. resobjext : '.or';
  49. sharedlibext : '.so';
  50. staticlibext : '.a';
  51. staticlibprefix : 'libp';
  52. sharedlibprefix : 'lib';
  53. sharedClibext : '.so';
  54. staticClibext : '.a';
  55. staticClibprefix : 'lib';
  56. sharedClibprefix : 'lib';
  57. importlibprefix : 'libimp';
  58. importlibext : '.a';
  59. Cprefix : '';
  60. newline : #10;
  61. dirsep : '/';
  62. assem : as_i386_elf32;
  63. assemextern : as_gas;
  64. link : ld_none;
  65. linkextern : ld_linux;
  66. ar : ar_gnu_ar;
  67. res : res_elf;
  68. dbg : dbg_stabs;
  69. script : script_unix;
  70. endian : endian_little;
  71. alignment :
  72. (
  73. procalign : 16;
  74. loopalign : 4;
  75. jumpalign : 0;
  76. constalignmin : 0;
  77. constalignmax : 8;
  78. varalignmin : 0;
  79. varalignmax : 16;
  80. localalignmin : 4;
  81. localalignmax : 8;
  82. recordalignmin : 0;
  83. recordalignmax : 16;
  84. maxCrecordalign : 4
  85. );
  86. first_parm_offset : 8;
  87. stacksize : 8*1024*1024;
  88. stackalign : 4;
  89. abi : abi_default
  90. );
  91. system_x86_6432_linux_info : tsysteminfo =
  92. (
  93. system : system_x86_6432_LINUX;
  94. name : 'Linux for x64_6432';
  95. shortname : 'Linux6432';
  96. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  97. tf_pic_uses_got,tf_smartlink_sections,
  98. tf_smartlink_library,tf_has_winlike_resources];
  99. cpu : cpu_x86_64;
  100. unit_env : 'LINUXUNITS';
  101. extradefines : 'UNIX;HASUNIX';
  102. exeext : '';
  103. defext : '.def';
  104. scriptext : '.sh';
  105. smartext : '.sl';
  106. unitext : '.ppu';
  107. unitlibext : '.ppl';
  108. asmext : '.s';
  109. objext : '.o';
  110. resext : '.res';
  111. resobjext : '.or';
  112. sharedlibext : '.so';
  113. staticlibext : '.a';
  114. staticlibprefix : 'libp';
  115. sharedlibprefix : 'lib';
  116. sharedClibext : '.so';
  117. staticClibext : '.a';
  118. staticClibprefix : 'lib';
  119. sharedClibprefix : 'lib';
  120. importlibprefix : 'libimp';
  121. importlibext : '.a';
  122. Cprefix : '';
  123. newline : #10;
  124. dirsep : '/';
  125. assem : as_i386_elf32;
  126. assemextern : as_gas;
  127. link : ld_none;
  128. linkextern : ld_linux;
  129. ar : ar_gnu_ar;
  130. res : res_elf;
  131. dbg : dbg_stabs;
  132. script : script_unix;
  133. endian : endian_little;
  134. alignment :
  135. (
  136. procalign : 16;
  137. loopalign : 4;
  138. jumpalign : 0;
  139. constalignmin : 0;
  140. constalignmax : 16;
  141. varalignmin : 0;
  142. varalignmax : 16;
  143. localalignmin : 4;
  144. localalignmax : 8;
  145. recordalignmin : 0;
  146. recordalignmax : 16;
  147. maxCrecordalign : 4
  148. );
  149. first_parm_offset : 8;
  150. stacksize : 8*1024*1024;
  151. stackalign : 16;
  152. abi : abi_default
  153. );
  154. system_m68k_linux_info : tsysteminfo =
  155. (
  156. system : system_m68k_linux;
  157. name : 'Linux for m68k';
  158. shortname : 'Linux';
  159. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  160. tf_requires_proper_alignment, { Coldfire seems to need this at least (KB) }
  161. tf_smartlink_library,tf_has_winlike_resources];
  162. cpu : cpu_m68k;
  163. unit_env : 'LINUXUNITS';
  164. extradefines : 'UNIX;HASUNIX';
  165. exeext : '';
  166. defext : '';
  167. scriptext : '.sh';
  168. smartext : '.sl';
  169. unitext : '.ppu';
  170. unitlibext : '.ppl';
  171. asmext : '.s';
  172. objext : '.o';
  173. resext : '.res';
  174. resobjext : '.or';
  175. sharedlibext : '.so';
  176. staticlibext : '.a';
  177. staticlibprefix : 'libp';
  178. sharedlibprefix : 'lib';
  179. sharedClibext : '.so';
  180. staticClibext : '.a';
  181. staticClibprefix : 'lib';
  182. sharedClibprefix : 'lib';
  183. importlibprefix : 'libimp';
  184. importlibext : '.a';
  185. Cprefix : '';
  186. newline : #10;
  187. dirsep : '/';
  188. assem : as_gas;
  189. assemextern : as_gas;
  190. link : ld_none;
  191. linkextern : ld_linux;
  192. ar : ar_gnu_ar;
  193. res : res_elf;
  194. dbg : dbg_stabs;
  195. script : script_unix;
  196. endian : endian_big;
  197. alignment :
  198. (
  199. procalign : 4;
  200. loopalign : 4;
  201. jumpalign : 0;
  202. constalignmin : 0;
  203. constalignmax : 4;
  204. varalignmin : 0;
  205. varalignmax : 4;
  206. localalignmin : 4;
  207. localalignmax : 4;
  208. recordalignmin : 0;
  209. recordalignmax : 2;
  210. maxCrecordalign : 4
  211. );
  212. first_parm_offset : 8;
  213. stacksize : 32*1024*1024;
  214. stackalign : 4;
  215. abi : abi_default
  216. );
  217. system_powerpc_linux_info : tsysteminfo =
  218. (
  219. system : system_powerpc_LINUX;
  220. name : 'Linux for PowerPC';
  221. shortname : 'Linux';
  222. flags : [tf_needs_symbol_size,tf_smartlink_sections,
  223. tf_needs_symbol_type,tf_files_case_sensitive,
  224. tf_smartlink_library,tf_has_winlike_resources];
  225. cpu : cpu_powerpc;
  226. unit_env : '';
  227. extradefines : 'UNIX;HASUNIX';
  228. exeext : '';
  229. defext : '.def';
  230. scriptext : '.sh';
  231. smartext : '.sl';
  232. unitext : '.ppu';
  233. unitlibext : '.ppl';
  234. asmext : '.s';
  235. objext : '.o';
  236. resext : '.res';
  237. resobjext : '.or';
  238. sharedlibext : '.so';
  239. staticlibext : '.a';
  240. staticlibprefix : 'libp';
  241. sharedlibprefix : 'lib';
  242. sharedClibext : '.so';
  243. staticClibext : '.a';
  244. staticClibprefix : 'lib';
  245. sharedClibprefix : 'lib';
  246. importlibprefix : 'libimp';
  247. importlibext : '.a';
  248. Cprefix : '';
  249. newline : #10;
  250. dirsep : '/';
  251. assem : as_gas;
  252. assemextern : as_gas;
  253. link : ld_none;
  254. linkextern : ld_linux;
  255. ar : ar_gnu_ar;
  256. res : res_elf;
  257. dbg : dbg_stabs;
  258. script : script_unix;
  259. endian : endian_big;
  260. alignment :
  261. (
  262. procalign : 4;
  263. loopalign : 4;
  264. jumpalign : 0;
  265. constalignmin : 0;
  266. constalignmax : 4;
  267. varalignmin : 0;
  268. varalignmax : 4;
  269. localalignmin : 4;
  270. localalignmax : 4;
  271. recordalignmin : 0;
  272. recordalignmax : 4;
  273. maxCrecordalign : 8
  274. );
  275. first_parm_offset : 8;
  276. stacksize : 32*1024*1024;
  277. stackalign : 16;
  278. abi : abi_powerpc_sysv;
  279. );
  280. system_powerpc64_linux_info : tsysteminfo =
  281. (
  282. system : system_powerpc64_LINUX;
  283. name : 'Linux for PowerPC64';
  284. shortname : 'Linux';
  285. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  286. tf_requires_proper_alignment,tf_smartlink_sections,tf_has_winlike_resources];
  287. cpu : cpu_powerpc64;
  288. unit_env : '';
  289. extradefines : 'UNIX;HASUNIX';
  290. exeext : '';
  291. defext : '.def';
  292. scriptext : '.sh';
  293. smartext : '.sl';
  294. unitext : '.ppu';
  295. unitlibext : '.ppl';
  296. asmext : '.s';
  297. objext : '.o';
  298. resext : '.res';
  299. resobjext : '.or';
  300. sharedlibext : '.so';
  301. staticlibext : '.a';
  302. staticlibprefix : 'libp';
  303. sharedlibprefix : 'lib';
  304. sharedClibext : '.so';
  305. staticClibext : '.a';
  306. staticClibprefix : 'lib';
  307. sharedClibprefix : 'lib';
  308. importlibprefix : 'libimp';
  309. importlibext : '.a';
  310. Cprefix : '';
  311. newline : #10;
  312. dirsep : '/';
  313. assem : as_gas;
  314. assemextern : as_gas;
  315. link : ld_none;
  316. linkextern : ld_linux;
  317. ar : ar_gnu_ar;
  318. res : res_elf;
  319. dbg : dbg_dwarf2;
  320. script : script_unix;
  321. endian : endian_big;
  322. alignment :
  323. (
  324. procalign : 8;
  325. loopalign : 4;
  326. jumpalign : 0;
  327. constalignmin : 4;
  328. constalignmax : 16;
  329. varalignmin : 4;
  330. varalignmax : 16;
  331. localalignmin : 0;
  332. localalignmax : 16;
  333. recordalignmin : 0;
  334. recordalignmax : 16;
  335. maxCrecordalign : 16
  336. );
  337. first_parm_offset : 8;
  338. stacksize : 10*1024*1024;
  339. stackalign : 16;
  340. abi : abi_powerpc_sysv
  341. );
  342. system_alpha_linux_info : tsysteminfo =
  343. (
  344. system : system_alpha_LINUX;
  345. name : 'Linux for Alpha';
  346. shortname : 'Linux';
  347. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  348. tf_smartlink_library,tf_has_winlike_resources];
  349. cpu : cpu_alpha;
  350. unit_env : 'LINUXUNITS';
  351. extradefines : 'UNIX;HASUNIX';
  352. exeext : '';
  353. defext : '.def';
  354. scriptext : '.sh';
  355. smartext : '.sl';
  356. unitext : '.ppu';
  357. unitlibext : '.ppl';
  358. asmext : '.s';
  359. objext : '.o';
  360. resext : '.res';
  361. resobjext : '.or';
  362. sharedlibext : '.so';
  363. staticlibext : '.a';
  364. staticlibprefix : 'libp';
  365. sharedlibprefix : 'lib';
  366. sharedClibext : '.so';
  367. staticClibext : '.a';
  368. staticClibprefix : 'lib';
  369. sharedClibprefix : 'lib';
  370. importlibprefix : 'libimp';
  371. importlibext : '.a';
  372. Cprefix : '';
  373. newline : #10;
  374. dirsep : '/';
  375. assem : as_gas;
  376. assemextern : as_gas;
  377. link : ld_none;
  378. linkextern : ld_linux;
  379. ar : ar_gnu_ar;
  380. res : res_elf;
  381. dbg : dbg_stabs;
  382. script : script_unix;
  383. endian : endian_little;
  384. alignment :
  385. (
  386. procalign : 4;
  387. loopalign : 4;
  388. jumpalign : 0;
  389. constalignmin : 0;
  390. constalignmax : 4;
  391. varalignmin : 0;
  392. varalignmax : 4;
  393. localalignmin : 4;
  394. localalignmax : 4;
  395. recordalignmin : 0;
  396. recordalignmax : 2;
  397. maxCrecordalign : 4
  398. );
  399. first_parm_offset : 8;
  400. stacksize : 32*1024*1024;
  401. stackalign : 8; { ??? }
  402. abi : abi_default
  403. );
  404. system_x86_64_linux_info : tsysteminfo =
  405. (
  406. system : system_x86_64_LINUX;
  407. name : 'Linux for x86-64';
  408. shortname : 'Linux';
  409. flags : [tf_smartlink_sections,tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
  410. tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
  411. tf_has_winlike_resources,tf_safecall_exceptions,tf_safecall_clearstack];
  412. cpu : cpu_x86_64;
  413. unit_env : 'LINUXUNITS';
  414. extradefines : 'UNIX;HASUNIX';
  415. exeext : '';
  416. defext : '.def';
  417. scriptext : '.sh';
  418. smartext : '.sl';
  419. unitext : '.ppu';
  420. unitlibext : '.ppl';
  421. asmext : '.s';
  422. objext : '.o';
  423. resext : '.res';
  424. resobjext : '.or';
  425. sharedlibext : '.so';
  426. staticlibext : '.a';
  427. staticlibprefix : 'libp';
  428. sharedlibprefix : 'lib';
  429. sharedClibext : '.so';
  430. staticClibext : '.a';
  431. staticClibprefix : 'lib';
  432. sharedClibprefix : 'lib';
  433. importlibprefix : 'libimp';
  434. importlibext : '.a';
  435. Cprefix : '';
  436. newline : #10;
  437. dirsep : '/';
  438. assem : as_x86_64_elf64;
  439. assemextern : as_gas;
  440. link : ld_none;
  441. linkextern : ld_linux;
  442. ar : ar_gnu_ar;
  443. res : res_elf;
  444. dbg : dbg_dwarf2;
  445. script : script_unix;
  446. endian : endian_little;
  447. alignment :
  448. (
  449. procalign : 16;
  450. loopalign : 8;
  451. jumpalign : 0;
  452. constalignmin : 0;
  453. constalignmax : 8;
  454. varalignmin : 0;
  455. varalignmax : 16;
  456. localalignmin : 4;
  457. localalignmax : 16;
  458. recordalignmin : 0;
  459. recordalignmax : 16;
  460. maxCrecordalign : 16
  461. );
  462. first_parm_offset : 16;
  463. stacksize : 8*1024*1024;
  464. stackalign : 16;
  465. abi : abi_default
  466. );
  467. system_sparc_linux_info : tsysteminfo =
  468. (
  469. system : system_SPARC_Linux;
  470. name : 'Linux for SPARC';
  471. shortname : 'Linux';
  472. flags : [tf_needs_symbol_size,tf_library_needs_pic,tf_smartlink_sections,
  473. tf_needs_symbol_type,tf_files_case_sensitive,
  474. tf_smartlink_library,tf_pic_uses_got,
  475. tf_requires_proper_alignment,tf_safecall_exceptions, tf_safecall_clearstack,
  476. tf_has_winlike_resources];
  477. cpu : cpu_SPARC;
  478. unit_env : 'LINUXUNITS';
  479. extradefines : 'UNIX;HASUNIX';
  480. exeext : '';
  481. defext : '.def';
  482. scriptext : '.sh';
  483. smartext : '.sl';
  484. unitext : '.ppu';
  485. unitlibext : '.ppl';
  486. asmext : '.s';
  487. objext : '.o';
  488. resext : '.res';
  489. resobjext : '.or';
  490. sharedlibext : '.so';
  491. staticlibext : '.a';
  492. staticlibprefix : 'libp';
  493. sharedlibprefix : 'lib';
  494. sharedClibext : '.so';
  495. staticClibext : '.a';
  496. staticClibprefix : 'lib';
  497. sharedClibprefix : 'lib';
  498. importlibprefix : 'libimp';
  499. importlibext : '.a';
  500. Cprefix : '';
  501. newline : #10;
  502. dirsep : '/';
  503. assem : as_gas;
  504. assemextern : as_gas;
  505. link : ld_none;
  506. linkextern : ld_linux;
  507. ar : ar_gnu_ar;
  508. res : res_elf;
  509. dbg : dbg_stabs;
  510. script : script_unix;
  511. endian : endian_big;
  512. alignment :
  513. (
  514. procalign : 4;
  515. loopalign : 4;
  516. jumpalign : 0;
  517. constalignmin : 4;
  518. constalignmax : 8;
  519. varalignmin : 4;
  520. varalignmax : 8;
  521. localalignmin : 4;
  522. localalignmax : 8;
  523. recordalignmin : 0;
  524. recordalignmax : 8;
  525. maxCrecordalign : 8
  526. );
  527. first_parm_offset : 92;
  528. stacksize : 8*1024*1024;
  529. stackalign : 8;
  530. abi : abi_default
  531. );
  532. {$ifdef FPC_ARMHF}
  533. system_arm_linux_info : tsysteminfo =
  534. (
  535. system : system_arm_Linux;
  536. name : 'Linux for ARMHF';
  537. shortname : 'Linux';
  538. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  539. tf_requires_proper_alignment,
  540. tf_smartlink_sections,tf_smartlink_library,tf_pic_uses_got,
  541. tf_has_winlike_resources];
  542. cpu : cpu_arm;
  543. unit_env : 'LINUXUNITS';
  544. extradefines : 'UNIX;HASUNIX;CPUARMHF';
  545. exeext : '';
  546. defext : '.def';
  547. scriptext : '.sh';
  548. smartext : '.sl';
  549. unitext : '.ppu';
  550. unitlibext : '.ppl';
  551. asmext : '.s';
  552. objext : '.o';
  553. resext : '.res';
  554. resobjext : '.or';
  555. sharedlibext : '.so';
  556. staticlibext : '.a';
  557. staticlibprefix : 'libp';
  558. sharedlibprefix : 'lib';
  559. sharedClibext : '.so';
  560. staticClibext : '.a';
  561. staticClibprefix : 'lib';
  562. sharedClibprefix : 'lib';
  563. importlibprefix : 'libimp';
  564. importlibext : '.a';
  565. Cprefix : '';
  566. newline : #10;
  567. dirsep : '/';
  568. assem : as_gas;
  569. assemextern : as_gas;
  570. link : ld_none;
  571. linkextern : ld_linux;
  572. ar : ar_gnu_ar;
  573. res : res_elf;
  574. dbg : dbg_stabs;
  575. script : script_unix;
  576. endian : endian_little;
  577. alignment :
  578. (
  579. procalign : 4;
  580. loopalign : 4;
  581. jumpalign : 0;
  582. constalignmin : 0;
  583. constalignmax : 8;
  584. varalignmin : 0;
  585. varalignmax : 8;
  586. localalignmin : 4;
  587. localalignmax : 8;
  588. recordalignmin : 0;
  589. recordalignmax : 8;
  590. maxCrecordalign : 8
  591. );
  592. first_parm_offset : 8;
  593. stacksize : 8*1024*1024;
  594. stackalign : 8;
  595. abi : abi_eabihf
  596. );
  597. {$else FPC_ARMHF}
  598. {$ifdef FPC_ARMEL}
  599. system_arm_linux_info : tsysteminfo =
  600. (
  601. system : system_arm_Linux;
  602. name : 'Linux for ARMEL';
  603. shortname : 'Linux';
  604. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  605. tf_requires_proper_alignment,
  606. tf_smartlink_sections,tf_smartlink_library,tf_pic_uses_got,
  607. tf_has_winlike_resources];
  608. cpu : cpu_arm;
  609. unit_env : 'LINUXUNITS';
  610. extradefines : 'UNIX;HASUNIX;CPUARMEL';
  611. exeext : '';
  612. defext : '.def';
  613. scriptext : '.sh';
  614. smartext : '.sl';
  615. unitext : '.ppu';
  616. unitlibext : '.ppl';
  617. asmext : '.s';
  618. objext : '.o';
  619. resext : '.res';
  620. resobjext : '.or';
  621. sharedlibext : '.so';
  622. staticlibext : '.a';
  623. staticlibprefix : 'libp';
  624. sharedlibprefix : 'lib';
  625. sharedClibext : '.so';
  626. staticClibext : '.a';
  627. staticClibprefix : 'lib';
  628. sharedClibprefix : 'lib';
  629. importlibprefix : 'libimp';
  630. importlibext : '.a';
  631. Cprefix : '';
  632. newline : #10;
  633. dirsep : '/';
  634. assem : as_gas;
  635. assemextern : as_gas;
  636. link : ld_none;
  637. linkextern : ld_linux;
  638. ar : ar_gnu_ar;
  639. res : res_elf;
  640. dbg : dbg_stabs;
  641. script : script_unix;
  642. endian : endian_little;
  643. alignment :
  644. (
  645. procalign : 4;
  646. loopalign : 4;
  647. jumpalign : 0;
  648. constalignmin : 0;
  649. constalignmax : 8;
  650. varalignmin : 0;
  651. varalignmax : 8;
  652. localalignmin : 4;
  653. localalignmax : 8;
  654. recordalignmin : 0;
  655. recordalignmax : 8;
  656. maxCrecordalign : 8
  657. );
  658. first_parm_offset : 8;
  659. stacksize : 8*1024*1024;
  660. stackalign : 8;
  661. abi : abi_eabi
  662. );
  663. {$else FPC_ARMEL}
  664. {$ifdef FPC_ARMEB}
  665. system_arm_linux_info : tsysteminfo =
  666. (
  667. system : system_arm_Linux;
  668. name : 'Linux for ARMEB';
  669. shortname : 'Linux';
  670. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  671. tf_requires_proper_alignment,
  672. tf_smartlink_sections,tf_smartlink_library,tf_pic_uses_got,
  673. tf_has_winlike_resources];
  674. cpu : cpu_arm;
  675. unit_env : 'LINUXUNITS';
  676. extradefines : 'UNIX;HASUNIX;CPUARMEB';
  677. exeext : '';
  678. defext : '.def';
  679. scriptext : '.sh';
  680. smartext : '.sl';
  681. unitext : '.ppu';
  682. unitlibext : '.ppl';
  683. asmext : '.s';
  684. objext : '.o';
  685. resext : '.res';
  686. resobjext : '.or';
  687. sharedlibext : '.so';
  688. staticlibext : '.a';
  689. staticlibprefix : 'libp';
  690. sharedlibprefix : 'lib';
  691. sharedClibext : '.so';
  692. staticClibext : '.a';
  693. staticClibprefix : 'lib';
  694. sharedClibprefix : 'lib';
  695. importlibprefix : 'libimp';
  696. importlibext : '.a';
  697. Cprefix : '';
  698. newline : #10;
  699. dirsep : '/';
  700. assem : as_gas;
  701. assemextern : as_gas;
  702. link : ld_none;
  703. linkextern : ld_linux;
  704. ar : ar_gnu_ar;
  705. res : res_elf;
  706. dbg : dbg_stabs;
  707. script : script_unix;
  708. endian : endian_big;
  709. alignment :
  710. (
  711. procalign : 4;
  712. loopalign : 4;
  713. jumpalign : 0;
  714. constalignmin : 0;
  715. constalignmax : 4;
  716. varalignmin : 0;
  717. varalignmax : 4;
  718. localalignmin : 4;
  719. localalignmax : 8;
  720. recordalignmin : 0;
  721. recordalignmax : 4;
  722. maxCrecordalign : 4
  723. );
  724. first_parm_offset : 8;
  725. stacksize : 8*1024*1024;
  726. stackalign : 4;
  727. abi : abi_default
  728. );
  729. {$else FPC_ARMEB}
  730. system_arm_linux_info : tsysteminfo =
  731. (
  732. system : system_arm_Linux;
  733. name : 'Linux for ARM';
  734. shortname : 'Linux';
  735. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  736. tf_requires_proper_alignment,
  737. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  738. cpu : cpu_arm;
  739. unit_env : 'LINUXUNITS';
  740. extradefines : 'UNIX;HASUNIX';
  741. exeext : '';
  742. defext : '.def';
  743. scriptext : '.sh';
  744. smartext : '.sl';
  745. unitext : '.ppu';
  746. unitlibext : '.ppl';
  747. asmext : '.s';
  748. objext : '.o';
  749. resext : '.res';
  750. resobjext : '.or';
  751. sharedlibext : '.so';
  752. staticlibext : '.a';
  753. staticlibprefix : 'libp';
  754. sharedlibprefix : 'lib';
  755. sharedClibext : '.so';
  756. staticClibext : '.a';
  757. staticClibprefix : 'lib';
  758. sharedClibprefix : 'lib';
  759. importlibprefix : 'libimp';
  760. importlibext : '.a';
  761. Cprefix : '';
  762. newline : #10;
  763. dirsep : '/';
  764. assem : as_gas;
  765. assemextern : as_gas;
  766. link : ld_none;
  767. linkextern : ld_linux;
  768. ar : ar_gnu_ar;
  769. res : res_elf;
  770. dbg : dbg_stabs;
  771. script : script_unix;
  772. endian : endian_little;
  773. alignment :
  774. (
  775. procalign : 4;
  776. loopalign : 4;
  777. jumpalign : 0;
  778. constalignmin : 0;
  779. constalignmax : 4;
  780. varalignmin : 0;
  781. varalignmax : 4;
  782. localalignmin : 4;
  783. localalignmax : 4;
  784. recordalignmin : 0;
  785. recordalignmax : 4;
  786. maxCrecordalign : 4
  787. );
  788. first_parm_offset : 8;
  789. stacksize : 8*1024*1024;
  790. stackalign : 4;
  791. abi : abi_default
  792. );
  793. {$endif FPC_ARMEB}
  794. {$endif FPC_ARMEL}
  795. {$endif FPC_ARMHF}
  796. system_mipseb_linux_info : tsysteminfo =
  797. (
  798. system : system_mipseb_LINUX;
  799. name : 'Linux for MIPSEB';
  800. shortname : 'Linux';
  801. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  802. tf_requires_proper_alignment,
  803. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  804. cpu : cpu_mipseb;
  805. unit_env : 'LINUXUNITS';
  806. extradefines : 'UNIX;HASUNIX';
  807. exeext : '';
  808. defext : '.def';
  809. scriptext : '.sh';
  810. smartext : '.sl';
  811. unitext : '.ppu';
  812. unitlibext : '.ppl';
  813. asmext : '.s';
  814. objext : '.o';
  815. resext : '.res';
  816. resobjext : '.or';
  817. sharedlibext : '.so';
  818. staticlibext : '.a';
  819. staticlibprefix : 'libp';
  820. sharedlibprefix : 'lib';
  821. sharedClibext : '.so';
  822. staticClibext : '.a';
  823. staticClibprefix : 'lib';
  824. sharedClibprefix : 'lib';
  825. importlibprefix : 'libimp';
  826. importlibext : '.a';
  827. // p_ext_support : false;
  828. Cprefix : '';
  829. newline : #10;
  830. dirsep : '/';
  831. assem : as_gas;
  832. assemextern : as_gas;
  833. link : ld_none;
  834. linkextern : ld_linux;
  835. ar : ar_gnu_ar;
  836. res : res_elf;
  837. dbg : dbg_stabs;
  838. script : script_unix;
  839. endian : endian_big;
  840. alignment :
  841. (
  842. procalign : 4;
  843. loopalign : 4;
  844. jumpalign : 0;
  845. constalignmin : 0;
  846. constalignmax : 8;
  847. varalignmin : 0;
  848. varalignmax : 8;
  849. localalignmin : 4;
  850. localalignmax : 8;
  851. recordalignmin : 0;
  852. recordalignmax : 8;
  853. maxCrecordalign : 8
  854. );
  855. first_parm_offset : 0;
  856. stacksize : 32*1024*1024;
  857. stackalign : 8;
  858. abi : abi_default
  859. );
  860. system_mipsel_linux_info : tsysteminfo =
  861. (
  862. system : system_mipsel_LINUX;
  863. name : 'Linux for MIPSEL';
  864. shortname : 'Linux';
  865. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  866. tf_requires_proper_alignment,
  867. tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
  868. cpu : cpu_mipsel;
  869. unit_env : 'LINUXUNITS';
  870. extradefines : 'UNIX;HASUNIX';
  871. exeext : '';
  872. defext : '.def';
  873. scriptext : '.sh';
  874. smartext : '.sl';
  875. unitext : '.ppu';
  876. unitlibext : '.ppl';
  877. asmext : '.s';
  878. objext : '.o';
  879. resext : '.res';
  880. resobjext : '.or';
  881. sharedlibext : '.so';
  882. staticlibext : '.a';
  883. staticlibprefix : 'libp';
  884. sharedlibprefix : 'lib';
  885. sharedClibext : '.so';
  886. staticClibext : '.a';
  887. staticClibprefix : 'lib';
  888. sharedClibprefix : 'lib';
  889. importlibprefix : 'libimp';
  890. importlibext : '.a';
  891. // p_ext_support : false;
  892. Cprefix : '';
  893. newline : #10;
  894. dirsep : '/';
  895. assem : as_gas;
  896. assemextern : as_gas;
  897. link : ld_none;
  898. linkextern : ld_linux;
  899. ar : ar_gnu_ar;
  900. res : res_elf;
  901. dbg : dbg_stabs;
  902. script : script_unix;
  903. endian : endian_little;
  904. alignment :
  905. (
  906. procalign : 4;
  907. loopalign : 4;
  908. jumpalign : 0;
  909. constalignmin : 0;
  910. constalignmax : 8;
  911. varalignmin : 0;
  912. varalignmax : 8;
  913. localalignmin : 4;
  914. localalignmax : 8;
  915. recordalignmin : 0;
  916. recordalignmax : 8;
  917. maxCrecordalign : 8
  918. );
  919. first_parm_offset : 0;
  920. stacksize : 32*1024*1024;
  921. stackalign : 8;
  922. abi : abi_default
  923. );
  924. implementation
  925. initialization
  926. {$ifdef CPUI386}
  927. {$ifdef linux}
  928. { some FreeBSD versions define linux as well }
  929. {$ifndef FreeBSD}
  930. set_source_info(system_i386_linux_info);
  931. {$endif FreeBSD}
  932. {$endif}
  933. {$endif CPUI386}
  934. {$ifdef CPU68}
  935. {$ifdef linux}
  936. set_source_info(system_m68k_linux_info);
  937. {$endif linux}
  938. {$endif CPU68}
  939. {$ifdef CPUX86_64}
  940. {$ifdef linux}
  941. set_source_info(system_x86_64_linux_info);
  942. {$endif linux}
  943. {$endif CPUX86_64}
  944. {$ifdef CPUALPHA}
  945. {$ifdef linux}
  946. set_source_info(system_alpha_linux_info);
  947. {$endif linux}
  948. {$endif CPUALPHA}
  949. {$ifdef CPUSPARC}
  950. {$ifdef linux}
  951. set_source_info(system_sparc_linux_info);
  952. {$endif linux}
  953. {$endif CPUSPARC}
  954. {$ifdef CPUPOWERPC32}
  955. {$ifdef linux}
  956. set_source_info(system_powerpc_linux_info);
  957. {$endif linux}
  958. {$endif CPUPOWERPC32}
  959. {$ifdef CPUPOWERPC64}
  960. {$ifdef linux}
  961. set_source_info(system_powerpc64_linux_info);
  962. {$endif linux}
  963. {$endif CPUPOWERPC64}
  964. {$ifdef CPUARM}
  965. {$ifdef linux}
  966. set_source_info(system_arm_linux_info);
  967. {$endif linux}
  968. {$endif CPUARM}
  969. {$ifdef CPUMIPSEB}
  970. {$ifdef linux}
  971. set_source_info(system_mipseb_linux_info);
  972. {$endif linux}
  973. {$endif CPUMIPSEB}
  974. {$ifdef CPUMIPSEL}
  975. {$ifdef linux}
  976. set_source_info(system_mipsel_linux_info);
  977. {$endif linux}
  978. {$endif CPUMIPSEL}
  979. end.