This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: Question on symbol versioning


> I have no idea what the above paragraph means.
>
> Object files don't have version definitions. ?Version definitions only
> appear in executables and shared libraries. ?In an object file, version
> names are appended to symbol names, separated by one or two '@'
> characters. ?If there are two '@' characters, the version is the default
> version. ?If there is only one, it is not.
>
> If an object file defines a symbol S with a version, and a different
> object refers to the symbol S with no version, then the reference
> matches the definition if the definition is a default version--i.e., if
> it has two '@' characters. ?Another way to phrase that is that a symbol
> definition with two '@' characters defines two symbols at link time: one
> symbol with no version, and one symbol with the specified version.

I realized that paragraph is actually talking about dynamic linking behavior.
for case where one executable file refers a symbol does not use versioning,
but the object with definition does and have more than one version for that
symbol, dynamic linker will associate that reference with so called base
definition, which is the oldest version and the most portable one(I guess).

Well, the only question is which one the base definition is. that paragraph
is not clear enough for me.

Thanks, Ian


-- 
Best Regards.


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