7.8.4. ATTR

The ATTR set directives set values for the ABI build attributes.

The ATTR scope directives specify the scope for which the set value applies to.

Syntax

ATTR FILESCOPE
ATTR SCOPE name
ATTR settype, tagid, value

where:

name

is a section name or symbol name.

settype

can be any of:

  • SETVALUE

  • SETSTRING

  • SETCOMPATIBLEWITHVALUE

  • SETCOMPATIBLEWITHSTRING

tagid

is an attribute tag name (or its numerical value) defined in the ABI for the ARM Architecture.

value

depends on settype:

  • is a 32-bit integer value when settype is SETVALUE or SETCOMPATIBLEWITHVALUE

  • is a nul-terminated string when settype is SETSTRING or SETCOMPATIBLEWITHSTRING

Usage

The ATTR set directives following the ATTR FILESCOPE directive apply to the entire object file. The ATTR set directives following the ATTR SCOPE name directive apply only to the named section or symbol.

For tags that expect an integer, you must use SETVALUE or SETCOMPATIBLEWITHVALUE. For tags that expect a string, you must use SETSTRING or SETCOMPATIBLEWITHSTRING. For the list of tag names, see Addenda to, and Errata in, the ABI for the ARM Architecture.

Use SETCOMPATIBLEWITHVALUE and SETCOMPATIBLEWITHSTRING to set tag values which the object file is also compatible with.

Examples

        ATTR  SETSTRING Tag_CPU_raw_name, "Cortex-A8"
        ATTR  SETVALUE  Tag_VFP_arch, 3   ; VFPv3 instructions were permitted.
        ATTR  SETVALUE  10, 3             ; 10 is the numerical value of
                                          ; Tag_VFP_arch.
Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0204J
Non-ConfidentialID101213