Example of creating versioned symbols

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

Example 39. 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 corresponding script file, which includes the addition of dependency information so that ver2 depends on ver1 is:

Example 40. Creating versioned symbols script file

ver1
{
    global:
        foo; bar;
    local:
        *;
};

ver2
{
    global:
        foo;
} ver1;

Show/hideSee also

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