12.9 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.
  • SETCOMPATWITHVALUE.
  • SETCOMPATWITHSTRING.
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 SETCOMPATWITHVALUE.
  • is a nul-terminated string when settype is SETSTRING or SETCOMPATWITHSTRING.

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 SETCOMPATWITHVALUE. For tags that expect a string, you must use SETSTRING or SETCOMPATWITHSTRING.
Use SETCOMPATWITHVALUE and SETCOMPATWITHSTRING 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 permitted.
    ATTR  SETVALUE  10, 3             ; 10 is the numerical value of 
                                      ; Tag_VFP_arch.
Related information
Addenda to, and Errata in, the ABI for the ARM Architecture
Non-ConfidentialPDF file icon PDF versionARM DUI0379G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.