[PATCH] elf: Update symbol versioning link and comments

H.J. Lu hjl.tools@gmail.com
Mon Nov 17 22:00:04 GMT 2025


On Mon, Nov 17, 2025 at 10:39 PM Michael Matz <matz@suse.de> wrote:
>
> Hello,
>
> On Sun, 16 Nov 2025, H.J. Lu wrote:
>
> > > > +/* Symbol is a global/weak defined/undefined base symbol.  */
> > >
> > > What is a base symbol?
> > >
> >
> > A base symbol can be created with:
> >
> > asm (".symver foo_base, foo@");
> >
> > to provide an unversioned compatible symbol:
> >
> > https://patchwork.sourceware.org/project/binutils/patch/CAMe9rOrn7nycxB77kFFwmvO7Ury89Y9mms8OUYUs7X9PN0baFw@mail.gmail.com/
>
> Please don't invent new terminology.  It's confusing enough already with
> the historic warts.  The above isn't an unversioned symbol.  It's one that
> uses VER_NDX_GLOBAL, and that _is_ a version.  If the file defining it
> contains a ver_def section then index 1 even may correspond to a named
> version.  If you must: call it "base version", as in

The version index 1 always maps to a versioned symbol with an empty
version.  It won't be any other version name.

>   /* Symbol is global/weak defined/undefined with base version.  */
>
> or somesuch.
>
>
> Ciao,
> Michael.



-- 
H.J.


More information about the Binutils mailing list