3.5 Encoding Control Flow Protection

Records the setting of the -cf-protection option. This is a bit mask using the following bits, based upon the definition of the enum cf_protection_level from gcc’s flag-types.h header file:

bit 0

Branches are protected. (ie -fcf-protection=branch).

bit 1

Returns are protected. (ie -fcf-protection=return).

bit 2

If set, this indicates that the other bits were explicitly set by an option on the gcc command line. Otherwise those bits were implicitly set by either other options or the backend concerned.

If both bits 0 and 1 are set then this implies the -fcf-protection=full option, and if neither are set then this implies the -fcf-protection=none option.

Note - in order to avoid storing a value of 0 in the note (which can be confused with a NUL-byte to indicate the end of a string), the value stored is biased by 1.