About embedded symbols

You can add specially-named symbols to input objects that cause the linker to create symbol versions. These symbols are of the form:

You must define these symbols, at the address of the function or data, as that you want to export. The symbol name is divided into two parts, a symbol name name and a version definition version. The name is added to the dynamic symbol table and becomes part of the interface to the shared object. Version creates a version called ver if it does not already exist and associates name with the version called ver.

The following example places the symbols foo@ver1, foo@@ver2, and bar@@ver1 into the object symbol table:

Example 41. Creating versioned symbols, embedded symbols

int old_function(void) __asm__("foo@ver1");
int new_function(void) __asm__("foo@@ver2");
int other_function(void) __asm__("bar@@ver1");

The linker reads these symbols and creates version definitions ver1 and ver2. The symbol foo is associated with a non-default version of ver1, and with a default version of ver2. The symbol bar is associated with a default version of ver1.

There is no way to create associations between versions with this method.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0474C
Non-ConfidentialID080411