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

Add crt2-command.o to provide __main_void #528

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Aug 19, 2024

this is a part of fixes for a regression caused by the shared library support. (#485)
it consists of two changes:

the orignal __main_void in libc is kept for now because we want to support old llvm for the time being.

background:
the shared library support (#429) made the __main_argc_argv reference weak for the benefit of shared library.
unfortunately, it caused a regression in some cases. (#485)
in the PR, it was considered to move __main_void into crt1.o. but the approach had its own subtleties, like breaking --no-gc-sections. (description: #429 (comment))

@sunfishcode
Copy link
Member

Could you describe somewhere how this change fixes the bug?

@yamt
Copy link
Contributor Author

yamt commented Aug 20, 2024

Could you describe somewhere how this change fixes the bug?

i added some explanation to the PR description.

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

Successfully merging this pull request may close these issues.

2 participants