Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of constructors mechanism inside clib4 #260

Open
afxgroup opened this issue Mar 1, 2025 · 0 comments
Open

Get rid of constructors mechanism inside clib4 #260

afxgroup opened this issue Mar 1, 2025 · 0 comments

Comments

@afxgroup
Copy link
Collaborator

afxgroup commented Mar 1, 2025

At moment clib4 use the same mechanism of clib2 to initialize the internal structures and libraries.

For example memory allocator has its own constructor (and destructor) to initialize all it needs to work correctly.

The constructors (and destructors) are executed inside _main function when exe file is loaded.

However if try to compile a program that has no main() function but for example _start() the constructors are not called and so the program crash.

We need to replace the constructors and destructors and move everything inside libOpen/libClose (or any suitable place).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant