mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-07 11:50:24 +00:00
Remove warning exec_static_constructors() warning
The warning falsely detected cases where shared objects where loaded before exec_static_constructors() was called as unneeded even in cases were the binary itself contained static globals. The commit also removes one redundant call to exec_static_constructors() from the block tester.
This commit is contained in:
parent
4c8369ab1b
commit
949130d80e
@ -391,7 +391,7 @@ struct Linker::Binary : private Root_object, public Elf_object
|
|||||||
{
|
{
|
||||||
Init::list()->exec_static_constructors();
|
Init::list()->exec_static_constructors();
|
||||||
|
|
||||||
/* call static construtors and register destructors */
|
/* call static constructors and register destructors */
|
||||||
Func * const ctors_start = (Func *)lookup_symbol("_ctors_start");
|
Func * const ctors_start = (Func *)lookup_symbol("_ctors_start");
|
||||||
Func * const ctors_end = (Func *)lookup_symbol("_ctors_end");
|
Func * const ctors_end = (Func *)lookup_symbol("_ctors_end");
|
||||||
for (Func * ctor = ctors_end; ctor != ctors_start; (*--ctor)());
|
for (Func * ctor = ctors_end; ctor != ctors_start; (*--ctor)());
|
||||||
@ -677,10 +677,6 @@ void Genode::init_ldso_phdr(Env &env)
|
|||||||
|
|
||||||
void Genode::exec_static_constructors()
|
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();
|
binary_ptr->finish_static_construction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,9 +386,6 @@ void perform(Genode::Env &env, Genode::Heap &heap, unsigned timeo_ms = 0)
|
|||||||
|
|
||||||
void Component::construct(Genode::Env &env)
|
void Component::construct(Genode::Env &env)
|
||||||
{
|
{
|
||||||
/* XXX execute constructors of global statics */
|
|
||||||
env.exec_static_constructors();
|
|
||||||
|
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user