04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiler-specific Features<br />

See also<br />

• __attribute__((section("name"))) on page 4-52<br />

• __attribute__((used)) on page 4-39.<br />

4.5.11 __attribute__((visibility("visibility_type")))<br />

This variable attribute affects the visibility of ELF symbols.<br />

Note<br />

This attribute is a GNU compiler extension supported by the <strong>ARM</strong> compiler.<br />

The possible values for visibility_type are the same as those specified for the function<br />

attribute of the same name.<br />

Example<br />

int i __attribute__((visibility(“hidden”)));<br />

See also<br />

• --arm_linux on page 2-9<br />

• --hide_all, --no_hide_all on page 2-71<br />

• __attribute__((visibility("visibility_type"))) on page 4-40.<br />

4.5.12 __attribute__((weak))<br />

The declaration of a weak variable is permitted, and acts in a similar way to __weak.<br />

• in GNU mode:<br />

extern int Variable_Attributes_weak_1 __attribute__((weak));<br />

• the equivalent in non-GNU mode is:<br />

__weak int Variable_Attributes_weak_compare;<br />

Note<br />

The extern qualifier is required in GNU mode. In non-GNU mode the compiler assumes<br />

that if the variable is not extern then it is treated like any other non weak variable.<br />

<strong>ARM</strong> DUI 0348C Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. 4-55<br />

ID101213<br />

Non-Confidential,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!