mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
[ld.so] Mark main module to not run ctors
Forgot to include this in the change for ld.so to run global ctors for all modules. The main module itself will have its ctors run last, by crt0, so mark it as not needing ctors in ld.so.
This commit is contained in:
@@ -66,6 +66,7 @@ ldso_init(j6_arg_header *stack_args, uintptr_t *got)
|
||||
image_list::item_type target_image;
|
||||
target_image.base = arg_loader->image_base;
|
||||
target_image.got = arg_loader->got;
|
||||
target_image.ctors = true; // crt0 will call the ctors
|
||||
target_image.read_dyn_table(
|
||||
reinterpret_cast<const dyn_entry*>(arg_loader->got[0] + arg_loader->image_base));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user