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.

Show/hideSyntax

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

Show/hideUsage

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.

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

Show/hideExamples

        ATTR  SETSTRING Tag_CPU_raw_name, "Cortex-R4F"
        ATTR  SETVALUE  Tag_VFP_arch, 3   ; VFPv3 instructions were permitted.
        ATTR  SETVALUE  10, 3             ; 10 is the numerical value of
                                          ; Tag_VFP_arch.

Show/hideSee also

Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0588B
Non-ConfidentialID062912