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.25 Example of creating versioned symbols<br />

10.25.1 See also<br />

BPABI and SysV shared libraries and executables<br />

The following example places <strong>the</strong> symbols foo@ver1, foo@@ver2, and bar@@ver1 into <strong>the</strong> object<br />

symbol table:<br />

int old_function(void) __asm__("foo@ver1");<br />

int new_function(void) __asm__("foo@@ver2");<br />

int o<strong>the</strong>r_function(void) __asm__("bar@@ver1");<br />

Example 10-1 Creating versioned symbols, embedded symbols<br />

The corresponding script file, which includes <strong>the</strong> addition of dependency information so that<br />

ver2 depends on ver1 is:<br />

ver1<br />

{<br />

global:<br />

foo; bar;<br />

local:<br />

*;<br />

};<br />

ver2<br />

{<br />

global:<br />

foo;<br />

} ver1;<br />

Example 10-2 Creating versioned symbols script file<br />

Concepts<br />

• About symbol versioning on page 10-27<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-29<br />

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!