[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:
Justin C. Miller
2024-04-30 22:24:34 -07:00
parent eb62588b79
commit e7fa1dde97

View File

@@ -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));