The current FPC version under developement is 1.9.x. Compiler internals are documented at the evolving FPC internals page.
General
Enable new style smartlinking: iin i_*.pas add tf_smartlink_sections to the flags field of the platform description record Also add --gc-sections to the call to ld.