Reputation: 11727
I'm building an RPM and while building I found following command is used to build one shared object of RPM.
g++ /*some compiler options*/ -O1 -Wl,--version-script abc.map -L<some paths> and the remaining command.
I did not understood the what is the use of "--version-script" option and "abc.map" file in the command. What it does? Follwoing is the content of "abc.map" file.
URE_1{
global:
_ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions
/*some method names explicitly*/
local:
*;
}
I think its related to making availability of symbols in the "shared object" file but I'm not sure.
Upvotes: 0
Views: 422
Reputation: 15121
I think its related to making availability of symbols in the "shared object" file but I'm not sure.
You are right.
See 3.9 VERSION Command:
The linker supports symbol versions when using ELF. Symbol versions are only useful when using shared libraries. The dynamic linker can use symbol versions to select a specific version of a function when it runs a program that may have been linked against an earlier version of the shared library.
Upvotes: 1