06.02.2013 Views

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - 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.

10.5 Symbol visibility for BPABI models<br />

10.5.1 See also<br />

BPABI and SysV shared libraries and executables<br />

Each symbol has a visibility property that can be controlled by compiler switches, a steering file,<br />

or attributes in <strong>the</strong> source code. If <strong>the</strong> symbol is a reference, <strong>the</strong> visibility controls <strong>the</strong> definitions<br />

that <strong>the</strong> linker can use to define <strong>the</strong> symbol. If <strong>the</strong> symbol is a definition, <strong>the</strong> visibility controls<br />

whe<strong>the</strong>r <strong>the</strong> symbol can be made visible outside <strong>the</strong> current module.<br />

The visibility options defined by <strong>the</strong> ELF specification are:<br />

Visibility Reference Definition<br />

STV_DEFAULT Symbol can be bound to a definition in a<br />

shared object.<br />

Symbol preemption is most common in System V (SysV) systems. Symbol preemption can<br />

happen in dynamically linked library (DLL) like implementations of <strong>the</strong> Base Platform<br />

Application Binary Interface (BPABI). The platform owner defines how this works. See <strong>the</strong><br />

documentation for your specific platform for more information.<br />

Concepts<br />

• Optimization with RW data compression on page 5-13<br />

• <strong>Linker</strong> options for SysV models on page 10-13<br />

• Automatic dynamic symbol table rules in <strong>the</strong> SysV memory model on page 10-15<br />

• Addressing modes in <strong>the</strong> SysV memory model on page 10-17<br />

• Thread local storage in <strong>the</strong> SysV memory model on page 10-18<br />

• Related linker command-line options for <strong>the</strong> SysV memory model on page 10-19<br />

• <strong>Linker</strong> options for bare metal and DLL-like models on page 10-21<br />

• About symbol versioning on page 10-27.<br />

Reference<br />

<strong>Linker</strong> Reference:<br />

• --keep_protected_symbols on page 2-91<br />

• --max_visibility=type on page 2-111<br />

• --override_visibility on page 2-115<br />

• --use_definition_visibility on page 2-177<br />

• EXPORT on page 3-2<br />

• IMPORT on page 3-4<br />

• REQUIRE on page 3-7.<br />

<strong>Compiler</strong> Reference:<br />

• --apcs=qualifer...qualifier on page 3-11<br />

• --dllexport_all, --no_dllexport_all on page 3-76<br />

• --dllimport_runtime, --no_dllimport_runtime on page 3-77<br />

Table 10-1 Symbol visibility<br />

Symbol can be made visible outside <strong>the</strong> module.<br />

It can be preempted by <strong>the</strong> dynamic linker by a<br />

definition from ano<strong>the</strong>r module.<br />

STV_PROTECTED Symbol must be resolved within <strong>the</strong> module. Symbol can be made visible outside <strong>the</strong> module.<br />

It cannot be preempted at run-time by a<br />

definition from ano<strong>the</strong>r module.<br />

STV_HIDDENSTV_INTERN<br />

AL<br />

Symbol must be resolved within <strong>the</strong> module. Symbol is not visible outside <strong>the</strong> module.<br />

<strong>ARM</strong> DUI 0474C Copyright © 2010-2011 <strong>ARM</strong>. All rights reserved. 10-7<br />

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!