You copied the Doc URL to your clipboard.

Example of creating versioned symbols

This example shows how to create versioned symbols in code and with a script file.

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

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 includes the addition of dependency information so that ver2 depends on ver1 is:

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

Related reference

Was this page helpful? Yes No