[fpc-pascal] Best start point for adding new FPC target
Karoly Balogh (Charlie/SGR)
charlie at scenergy.dfmk.hu
Tue Jan 28 21:42:52 CET 2020
On Tue, 28 Jan 2020, Florian Kl?mpfl wrote:
> > The primary goal of a startup code is to get pointers to the command
> > line parameters and the environment block. If arm-freebsd uses the stack
> > to pass these pointers (the same way as i386-freebsd), then you need
> > just to convert the i386 startup assembly to the arm assembly.
> > For start you need only the prt0.as file.
> I strongly recommend to create pascal startup files for newly added targets.
There was some extra section on BSDs identifying which syscall version the
binary uses, and some other stuff, IIRC. Which makes it difficult to add a
Pascal startup code. But the assembly part can be minimized indeed. Not
sure if that can be added by the internal assembler. Probably it can be
generated by the compiler though?
Also there was some other thing with weak references I don't remember.
More information about the fpc-pascal