thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Application & OT Security · Advanced

Compiler Hardening Flags

Compiler and linker options that add exploit mitigations and stricter checks to built binaries.

Definition

Examples include stack protectors, _FORTIFY_SOURCE, position-independent executables, full RELRO, Control Flow Guard and treating warnings as errors. OpenSSF publishes compiler options hardening guides for C and C++.

Example

Building with -fstack-protector-strong -D_FORTIFY_SOURCE=3 -fPIE -pie -Wl,-z,relro,-z,now

Exam tip

Build hardening is an SSDLC implementation control for native code.

Related terms