user3612009
user3612009

Reputation: 655

what is the meaning of @@ sign after a symmbol name

I get the following link error when linking a binary:

U std::out_of_range::~out_of_range()@@GLIBCXX_3.4.15

I would like to know the meaning of the @@ at the end. I assume it is part of the symbol name, but at the same time it conveys something? Does it say that this symbol is found in stdlib version 3.4.15 only?

Upvotes: 0

Views: 132

Answers (1)

davmac
davmac

Reputation: 20631

It's a versioned symbol. When API changes are made, this allows for both the old and new version of a function to exist in the same library, so that old programs can still dynamically link against a newer version of the library. I haven't seen this used with C++ before but it is commonly used in glibc.

Typically when you link your object files into an executable (or library) the linker will resolve against the most recent version of each symbol, and your executable is then bound to that version.

Does it say that this symbol is found in stdlib version 3.4.15 only?

Not exactly. It means that your object/binary is linking to that specific version of the symbol, which ideally will be present in version 3.4.15 of the library but also in later versions (especially versions where the ABI hasn't changed, but potentially also in versions where it has, in which case there will also be a newer versioned symbol).

Upvotes: 1

Related Questions