Warn on redundant call to exec_static_constructors()

This commit is contained in:
Christian Helmuth
2018-04-03 17:09:47 +02:00
parent b3791fabc2
commit 92edcb17e5
3 changed files with 4 additions and 6 deletions

View File

@ -653,6 +653,10 @@ void Genode::init_ldso_phdr(Env &env)
void Genode::exec_static_constructors()
{
if (!binary_ptr->static_construction_pending())
warning("Don't call Genode::Env::exec_static_constructors() "
"in components without static globals");
binary_ptr->finish_static_construction();
}