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

Support reading thin archives #648

Closed
bjorn3 opened this issue Mar 19, 2024 · 3 comments · Fixed by #651
Closed

Support reading thin archives #648

bjorn3 opened this issue Mar 19, 2024 · 3 comments · Fixed by #651

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Mar 19, 2024

This is necessary to fix rust-lang/rust#107407 and allow moving rustc from LLVM's archive writer to ar_archive_writer again. The api for this should probably not directly read the member contents from the disk, but only parse the thin archive to get the member names (and optionally read the symbol table) to allow the consumer of this api to read them from the disk as necessary.

@philipc
Copy link
Contributor

philipc commented Mar 24, 2024

#651 has thin archive support. What do you need for symbol table support? The symbol table contains a list of member offsets and symbol names. I can provide an iterator that returns those, and an ArchiveFile method to return a member at a given offset. Is that sufficient?

@bjorn3
Copy link
Contributor Author

bjorn3 commented Mar 24, 2024

The symbol table of the original archives is not currently used by the archive writer in rustc. It unconditionally looks directly at the object files. So at least for now reading the symbol table is not necessary.

@philipc
Copy link
Contributor

philipc commented Mar 25, 2024

I'll leave symbol table support for #479

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 a pull request may close this issue.

2 participants