On linux based OSes, Godot must generate pure and simple ELF64 binaries which do libdl everything from the system, and that means:
* no C/c++ main(), but the sysv ABI entry point (which is basically main() anyway). When the libc will be libdl-ed, the init functions are called with the same arguments stack than the sysv ABI entry point.
* interact with system TLS-ized variable with only the sysv ABI __tls_get_addr(), for instance if there is a need to use errno. I have to admit, I did not get really into this issue yet (but there my be seriously nasty things related to the "TLS offset").
* fork the static gcc/clang libstdc++ in order to libdl-ize it, because even with -static-libstdc++/-static-libgcc options, it won't libdl what it requires from the system libs (gcc devs 100% at fault here, they have been carefully ignoring the availability of games on linux OSes for a decade). rant[on], to avoid this and the dependency on the very few c++ compilers (because c++ syntax is beyond sanity), godot should have been a simple and lean C project, rant[off].
Currently, the only way to mitigate the GNU symbol versoning abuse from the glibc devs (100% their fault), is to compile/link against a years old glibc (_REALLY_ old).
That said, they should od exactly the same on other OSes, which means the code structure would be the same, only different compile-time and runtime function tables.
That said, they should od exactly the same on other OSes, which means the code structure would be the same, only different compile-time and runtime function tables.