When debugging a link error (undefined reference to _dso_handle
) using the Android x86 toolchain, I noticed it's statically linking crtbegin_dynamic.o
. What is the purpose of this file? There is another similar crtbegin.o
in the toolchain install directory that contains the missing symbol (_dso_handle). What is the difference between crtbegin.o and crtbegin_dynamic.o?
C++ has global constructors and destructors. crtbegin.o and crtend.o deal with calling those constructors and destructors. The variants of crtbegin.o such as crtbeginS.o do the same thing for other types of executables such as static executables and shared libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With