| |||
| Home > BPABI and SysV shared libraries and executables > 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;
Linker Reference: