Hardening

This is an old revision of Hardening, edited by Dbannon at . The current revision is 144378.

see also

Hardening - PIE or PIC

Overview

For our purpose here, "hardening" means making your binary harder to hack while running. Key is PIE, Position Independent Executable. FPC supports PIE with a couple of options on most platforms. Some environments require it and it makes good sense, especially in a server application. Its suggested that PIE Hardening increases the size of an executable and slows it down marginally.

Most projects only require the following extra FPC command line switches -

-Cg -k-pie -znow

However, there are some corner cases -

See Also