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

Use a versioning scheme for bytecode objects in rlibs #16139

Merged
merged 1 commit into from
Aug 4, 2014

Conversation

michaelwoerister
Copy link
Member

Before this commit, the LLVM IR of exported items was simply zip-compressed and stored as an object file inside rlib archives. This commit adds a header to this "object" containing a file identifier and a format version number so the compiler can deal with changes in the way bytecode objects are stored within rlibs.

While updating the format of bytecode objects, this commit also worksaround a problem in LLDB which could not handle odd-sized objects within archives before mid-2014.

Fixes #15950.

return Ok(());
};

match writing_function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you extract this functionality of writing the bytecode into a separate function? (outside of link_rlib)

@alexcrichton
Copy link
Member

Looks good to me, thanks!

@michaelwoerister
Copy link
Member Author

Updated!

Before this commit, the LLVM IR of exported items was simply zip-compressed and stored as an object file inside rlib archives. This commit adds a header to this "object" containing a file identifier and a format version number so the compiler can deal with changes in the way bytecode objects are stored within rlibs.

While updating the format of bytecode objects, this commit also worksaround a problem in LLDB which could not handle odd-sized objects within archives before mid-2014.
@michaelwoerister
Copy link
Member Author

Fixed the trailing whitespace and rebased. I'll let bors give it another try.

bors added a commit that referenced this pull request Aug 4, 2014
…excrichton

Before this commit, the LLVM IR of exported items was simply zip-compressed and stored as an object file inside rlib archives. This commit adds a header to this "object" containing a file identifier and a format version number so the compiler can deal with changes in the way bytecode objects are stored within rlibs.

While updating the format of bytecode objects, this commit also worksaround a problem in LLDB which could not handle odd-sized objects within archives before mid-2014.

Fixes #15950.
@bors bors closed this Aug 4, 2014
@bors bors merged commit ff0fa8f into rust-lang:master Aug 4, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Jan 3, 2024
Make functions in impl have a container name

fixes rust-lang#16015
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.

debuginfo: LLDB segfaults for some archives containing padding bytes at the end.
3 participants