The GOW note encodes the optimization level (-O) and
debugging level (-g) used when compiling a binary. In order
to save space this is stored as a bit field with the bits having the
following meanings:
bits 0 - 2The debug type, ie DBX, DWARF, VMS or XCOFF. As specified by the -gstabs, -gdwarf, -gvms and -gxcoff options.
bit 3Set if GNU extensions to the debug type have been enabled.
bits 4 - 5The debug info level ie TERSE, NORMAL or VERBOSE as set by the -g<level> option.
bits 6 - 8The DWARF version, if DWARF is being generated. Set by the -gdwarf-<version> option.
bits 9 - 10The optimization level as set by the -O<number> option. Levels above 3 are treated as if they were 3.
bit 11Set if the optimize-for-size option (-Os) is enabled.
bit 12Set if the inaccurate-but-fast optimization option (-Ofast) has been enabled.
bit 13Set if the optimize-with-debugging option (-Og) has been enabled.
bit 14Set if the enable most warnings option (-Wall) has been enabled.
bit 15Set if the format security warning option (-Wformat-security) has been enabled.
bit 16Set if LTO compilation has been enabled.
bit 17Set if LTO compilation has not been enabled.
This bit is here so that tools can detect notes created by earlier versions of annobin which did not set any bits higher than 15.
bits 18 - 19These bits are used to record the setting of gcc’s -ftrivial-auto-var-init command line option. If both bits are clear then the option is not supported by the compiler. If bit 18 is set but bit 19 is clear, then the compiler supports the option, but either it was not used, or it was used but the option’s value was skip. Otherwise if bit 19 is clear then the option was used but its value was set to pattern (which is inappropriate for production binaries) or if bit 19 is set then the option was used and its value was set to zero.
bits 20 - 21These bits are used to record the setting of gcc’s -fzero-call-used-regs command line option. If both bits are clear the option is not supported by the compiler. Otherwise if bit 20 is set (and bit 21 is clear) then the option is supported but it was not used, or it was used, but its value was set to skip. Otherwise both bits 20 and 21 should be set, indicating that the option was used and a value other than skip was used.
bits 22 - 23These bits are used to record the setting of gcc’s -Wimplicit-int warning. Enabling this warning is important as variables with an implicit type of int can cause problems when they are used in situations where they are expected to be compatible with pointers. The meanings of the two bits are as follows:
bit22 = 0, bit23 = 0The annobin plugin did not record any information about this warning, probably because the plugin is an old version.
bit22 = 1, bit23 = 0The warning has been disabled.
bit22 = 0, bit23 = 1The warning has its default value. It has not been altered via a command line option.
bit22 = 1, bit23 = 1The warning has been enabled via a command line option.
Note - whilst this warning is normally enabled it can be manually disabled. Hence the need for this extra test.
Note - this test is only really relevent to C source code. Other languages are not affected.
bits 24 - 25These bits are used to record the setting of gcc’s -Wimplicit-function-declaration warning. Enabling this warning is important as functions that are assumed to accept int parameters or return int values can cause problems when pointers are involved. The meanings of the two bits are as follows:
bit22 = 0, bit23 = 0The annobin plugin did not record any information about this warning, probably because the plugin is an old version.
bit22 = 1, bit23 = 0The warning has been disabled.
bit22 = 0, bit23 = 1The warning has its default value. It has not been altered via a command line option.
bit22 = 1, bit23 = 1The warning has been enabled via a command line option.
Note - whilst this warning is normally enabled it can be manually disabled. Hence the need for this extra test.
Note - this test is only really relevent to C source code. Other languages are not affected.
bits 26 - 28These bits record the settings of gcc’s flexible array strengthening. Bit 26 is set only if the feature is supported by the compiler. If bit 26 is not set then bits 27 to 28 should be ignored. Bit 27 is set if the -Wstrict-flex-arrays warnings is enabled. Bit 28 is set if the -fstrict-flex-arrays option has been set to a value greater than zero.
The other bits are not currently used and should be set to zero so they can be used in future extensions to the specification.