10.6.4 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;
Non-ConfidentialPDF file icon PDF versionARM DUI0474M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.