2.8. Adding symbol versions

The compiler and linker support the GNU-extended symbol versioning model.

To create a function with a symbol version in C or C++ code, you must use the assembler label GNU extension to rename the function symbol into a symbol that has the name function@@ver for a default ver of function, or function@ver for a non default ver of function.

For example, to define a default version:

int new_function(void) __asm__("versioned_fun@@ver2");
int new_function(void)
{
    return 2;
}

To define a non default version:

int old_function(void) __asm__("versioned_fun@ver1");
int old_function(void)
{
    return 1;
}

For more information see:

Copyright © 2002-2007 ARM Limited. All rights reserved.ARM DUI 0205H
Non-Confidential