Well, its more than difficult to get through this topic - too many documentation pages with old content and not valid any more.
I just wanted to check, if I could get the following program to build an executable:
program test;
var
a: Int32;
begin
a := 2;
a := a + 2 + 2;
end.
with the following command:
ppcross68k test.pas -O1 -a -Cp68000 -Tembedded -e/home/mf/fpc-3.2.2/m68k-none-elf/bin
The hardware has nothing to do with linux or other operating system. Its bare metal programing ... embedded.
I get a test.elf, but with no content. For all the other files (system.pas) the compiler produces *.o files. The test.o file seems to have a good content:
Disassembly of section .text.n_main:
00000000 <main>:
0: 4e56 0000 linkw %fp,#0
4: 4eb9 0000 0000 jsr 0 <main>
a: 7002 moveq #2,%d0
c: 7006 moveq #6,%d0
e: 4eb9 0000 0000 jsr 0 <main>
14: 4e5e unlk %fp
16: 4e75 rts
and this is the test.s:
.file "test.pas"
# Begin asmlist al_procedures
.section .text.n_main
.balignw 4,0x4e71
.globl PASCALMAIN
PASCALMAIN:
.globl main
main:
link.w %a6,#0
jbsr fpc_initializeunits
moveq.l #2,%d0
moveq.l #6,%d0
jbsr fpc_do_exit
unlk %a6
rts
.Le0:
....