* Gernot Reisinger <Gernot.Reisinger@omnino.at> [2018-11-21 16:52:53 +0100]:
> I did no extensive research how glibc executes these constructor calls. At
> least the call stack indicates that they are partially executed in dynamic
> linker context - _dl_start_user () in /lib64/ld-linux-x86-64.so
> calling _dl_init.
the dynamic linker runs the
- preinit_array functions of the main executable,
- the init_array and DT_INIT functions of shared libraries.
then via __libc_start_main the _init and init_array functions
of the main executable are run by libc_nonshared.a code that
is linked into the executable.
so part of the initialization (main exe) does require entry
via __libc_start_main (but this is not an issue for go).
however this design can change when glibc introduces a new
symbol version for __libc_start_main, so i don't see how
go can rely on any of this.