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.24 Symbol versioning script file<br />

10.24.1 See also<br />

BPABI and SysV shared libraries and executables<br />

You can embed <strong>the</strong> commands to produce symbol versions in a script file that is specified by <strong>the</strong><br />

command-line option --symver_script=file. <strong>Using</strong> this option automatically enables symbol<br />

versioning.<br />

The script file supports <strong>the</strong> same syntax as <strong>the</strong> GNU ld linker.<br />

<strong>Using</strong> a script file enables you to associate a version with an earlier version.<br />

A steering file can be provided in addition to <strong>the</strong> embedded symbol method. If you choose to do<br />

this <strong>the</strong>n your script file must match your embedded symbols and use <strong>the</strong> Backus-Naur Form<br />

(BNF) notation:<br />

version_definition ::=<br />

version_name "{" symbol_association* "}" [depend_version] ";"<br />

The version_name is a string containing <strong>the</strong> name of <strong>the</strong> version. depend_version is a string<br />

containing <strong>the</strong> name of a version that this version_name depends on. This version must have<br />

already been defined in <strong>the</strong> script file. Version names are not significant, but it helps to choose<br />

readable names, for example:<br />

symbol_association ::=<br />

"local:" | "global:" | symbol_name ";"<br />

where:<br />

• "local:" indicates that all subsequent symbol_names in this version definition are local to<br />

<strong>the</strong> shared object and are not versioned.<br />

• "global:" indicates that all subsequent symbol_names belong to this version definition.<br />

There is an implicit "global:" at <strong>the</strong> start of every version definition.<br />

• symbol_name is <strong>the</strong> name of a global symbol in <strong>the</strong> static symbol table.<br />

Note<br />

If you use a script file <strong>the</strong>n <strong>the</strong> version definitions and symbols associated with <strong>the</strong>m must<br />

match. The linker warns you if it detects any mismatch.<br />

Concepts<br />

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

• Example of creating versioned symbols on page 10-29<br />

• <strong>Linker</strong> options for enabling implicit symbol versioning on page 10-31.<br />

Reference<br />

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

• --symver_script=file on page 2-167.<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!