[fpc-devel] elf load order

Andrew Haines AndrewD207 at aol.com
Fri Mar 16 19:16:01 CET 2012


I'm trying to figure out the order of events when an elf file is executed.

I think that the _start symbol just points to the start of the .text
section and crt1 is first followed by crti followed by crtbegin. After
that I'm not sure.

I am porting fpc to the xenon platform and it uses the elf file format
for executables.

I know that code in System.pp the begin end block at the end is being
executed but when that procedure (PASCALMAIN?) exits, where is the next
code begin executed?

in my test program.pas the begin end block is not called afaict.

I only have a putline method I wrote to debug. I can't currently follow
the code with a debugger.



More information about the fpc-devel mailing list