This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unspecified base version support in glibc and linker


Hi Ulrich,

When symbol versioning was first implemented in linker, unspecified
base version was the part of the design. According to the linker
document:

   When the linker finds a symbol defined in a library which is not
specifically bound to a version node, it will effectively bind it to an
unspecified base version of the library.  You can bind all otherwise
unspecified symbols to a given version node by using `global: *;'
somewhere in the version script.

...

   To do this, you must use multiple `.symver' directives in the source
file.  Here is an example:

     __asm__(".symver original_foo,foo@");
     __asm__(".symver old_foo,foo@VERS_1.1");
     __asm__(".symver old_foo1,foo@VERS_1.2");
     __asm__(".symver new_foo,foo@@VERS_2.0");

   In this example, `foo@' represents the symbol `foo' bound to the
unspecified base version of the symbol.  The source file that contains
this example would define 4 C functions: `original_foo', `old_foo',
`old_foo1', and `new_foo'.

The verion index 1 has always been reserved for unspecified base
version by the linker.

But unspecified base version was never implemented by glibc and we
didn't notice it until someone found and tried it in the linker
manual.

Ulrich, I understand you have some concerns that supporting unspecified
base version may have negative impact on versioned libraries without
unspecified base version. Since unspecified base version was never
in glibc, are you worried about verion index 1 may be used by some
named versions and using verion index 1 for unspecified base version
may cause trouble for those shared libraries? I'd like to resolve
this issue. If glibc can't support unspecified base version saftly,
I will at least remove the references to unspecified base version
from the linker manual.

Thanks.



H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]