8.1 gnu Object Attributes

The .gnu_attribute directive records an object attribute with vendor ‘ gnu ’.

Except for ‘ Tag_compatibility ’, which has both an integer and a string for its value, gnu attributes have a string value if the tag number is odd and an integer value if the tag number is even. The second bit (tag & 2 is set for architecture-independent attributes and clear for architecture-dependent ones.

8.1.1 Common gnu attributes

These attributes are valid on all architectures.

Tag_compatibility (32)
The compatibility attribute takes an integer flag value and a vendor name. If the flag value is 0, the file is compatible with other toolchains. If it is 1, then the file is only compatible with the named toolchain. If it is greater than 1, the file can only be processed by other toolchains under some private arrangement indicated by the flag value and the vendor name.

8.1.2 MIPS Attributes

Tag_GNU_MIPS_ABI_FP (4)
The floating-point ABI used by this object file. The value will be:
  • 0 for files not affected by the floating-point ABI.
  • 1 for files using the hardware floating-point ABI with a standard double-precision FPU.
  • 2 for files using the hardware floating-point ABI with a single-precision FPU.
  • 3 for files using the software floating-point ABI.
  • 4 for files using the deprecated hardware floating-point ABI which used 64-bit floating-point registers, 32-bit general-purpose registers and increased the number of callee-saved floating-point registers.
  • 5 for files using the hardware floating-point ABI with a double-precision FPU with either 32-bit or 64-bit floating-point registers and 32-bit general-purpose registers.
  • 6 for files using the hardware floating-point ABI with 64-bit floating-point registers and 32-bit general-purpose registers.
  • 7 for files using the hardware floating-point ABI with 64-bit floating-point registers, 32-bit general-purpose registers and a rule that forbids the direct use of odd-numbered single-precision floating-point registers.

8.1.3 PowerPC Attributes

Tag_GNU_Power_ABI_FP (4)
The floating-point ABI used by this object file. The value will be:
  • 0 for files not affected by the floating-point ABI.
  • 1 for files using double-precision hardware floating-point ABI.
  • 2 for files using the software floating-point ABI.
  • 3 for files using single-precision hardware floating-point ABI.

Tag_GNU_Power_ABI_Vector (8)
The vector ABI used by this object file. The value will be:
  • 0 for files not affected by the vector ABI.
  • 1 for files using general purpose registers to pass vectors.
  • 2 for files using AltiVec registers to pass vectors.
  • 3 for files using SPE registers to pass vectors.

8.1.4 IBM z Systems Attributes

Tag_GNU_S390_ABI_Vector (8)
The vector ABI used by this object file. The value will be:
  • 0 for files not affected by the vector ABI.
  • 1 for files using software vector ABI.
  • 2 for files using hardware vector ABI.