Question about dynamic symbols in executable file using -static-libstdc++

Jonathan Wakely jwakely@redhat.com
Wed Apr 8 15:37:10 GMT 2020


On 06/04/20 14:49 +0200, Daniel Haid wrote:
>I have the following test.cpp:
>
>-----
>#include <iostream>
>
>int main()
>{
>	return 0;
>}
>-----
>
>If I compile it with "g++ test.cpp -static-libstdc++" and then do 
>"objdump -T a.out", there are a lot of dynamic (?) symbols like
>
>[...]
>00000000000529d0  w   DF .text	0000000000000023  Base 
>_ZNKSt10moneypunctIwLb0EE16do_negative_signEv
>000000000007e540  w   DF .text	0000000000000046  Base 
>_ZNKSt7__cxx1110moneypunctIcLb0EE16do_positive_signEv
>[...]

I don't see this with the program above and the command you used.

>Why are there dynamic symbols in an executable file and for what are 
>they used?
>



More information about the Libstdc++ mailing list