Closed cristian-programmer closed 4 years ago
If I recall correctly, the global constructor isn't getting called in the kernel
If constructors aren't getting called then I think they shouldn't be added in, it'll save up binary space.
It's C so there is no constructor to call, at least in the kernel, I know there is one in libposix to initialize stdio
aa ok, here the link: https://wiki.osdev.org/Calling_Global_Constructors#Using_crti.o.2C_crtbegin.o.2C_crtend.o.2C_and_crtn.o_in_a_Kerne I have been reading about this article on osdev.org, in skifos I thought I saw the call to these constructors @RossComputerGuy That means that I don't necessarily need to call the builders, isn't it an obligation for the kernel?
Yes there is one call to init in the userspace side of libsystem
@NicolasVanBossuyt good thank you, crt0.o crti.o, crtn.o Isn't it really necessary to call these files objects? that is mentioned in the osdev article
Yes you have to have them or gcc will complain '^^
Very Thanks!
Hello colleagues, why do you need to call global constructors before starting the kernel? I understand that in a user space program it is called before the main function, to do something, But what should the core call before starting?