Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
Panzerschrek
1mo ago
0 comments
Save
Share
But what if I have a C++ dynamic library? Does it call constructors for global variables before
_start
function in the main program starts?
0 comments
1 comments · 1 top-level
top
newest
oldest
bonzini
1mo ago
_start takes care of calling the global initializers and register the atexit callback for the finalizers.
(In practice _start calls __libc_start_main, a libc function that handles all of that).
j
/
k
navigate · click thread line to collapse