Skip to content

elf: report errors for some detected malformed object contents #18207

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

Merged
merged 14 commits into from
Dec 5, 2023

Conversation

kubkon
Copy link
Member

@kubkon kubkon commented Dec 5, 2023

Fixes #18205

Although it fixes the above issue, it's just the beginning of proper error handling in the linker. I will be adding better error catching and reporting incrementally as it's quite an involved task.

This PR also addresses a latent bug in writing a static library when one source is incrementally compiled Zig source - an example of this could be generating libcompiler_rt.a without LLVM. The bug would incorrectly calculate the total size of the incrementally compiled Zig source and thus it would fail to correctly re-encode it in the output archive file.

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.

ELF linker code crashes instead of reporting malformed archive
2 participants