문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top