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

Fix handling of section offsets for DWARF version 2/3 #365

Merged
merged 2 commits into from
Jan 23, 2019

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Jan 21, 2019

This is on top of #364.

For writing, we must use DW_FORM_data4/8 instead of DW_FORM_sec_offset for version 2/3.

For reading, we weren't handling relocations for DW_FORM_data4/8.

There's also a commit to always do endian conversions on DW_FORM_data2/4/8. I think this is usually what we want, and it makes the fixes in this PR simpler. See also https://github.com/bjorn3/rustc_codegen_cranelift/pull/291#discussion_r249264661.

@philipc philipc requested a review from fitzgen January 21, 2019 09:42
@coveralls
Copy link

coveralls commented Jan 21, 2019

Coverage Status

Coverage increased (+0.04%) to 87.589% when pulling 29a86ed on philipc:sec-offset into d8f630b on gimli-rs:master.

This is nearly always what is needed.
For writing, we must use DW_FORM_data4/8 instead of DW_FORM_sec_offset
for version 2/3.

For reading, we weren't handling relocations for DW_FORM_data4/8.
@philipc philipc merged commit bedf4f0 into gimli-rs:master Jan 23, 2019
@philipc philipc deleted the sec-offset branch January 23, 2019 03:07
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.

3 participants