-
Notifications
You must be signed in to change notification settings - Fork 341
[LLDB][ELF] Fix section unification to not just use names. #8661
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
[LLDB][ELF] Fix section unification to not just use names. #8661
Conversation
Section unification cannot just use names, because it's valid for ELF binaries to have multiple sections with the same name. We should check other section properties too. rdar://124467787
Fixed a couple of nits from review, and fixed up formatting. Also added a test. rdar://124467787
As pointed out by @labath, if you use `objcopy --only-keep-debug`, only placeholder sections will be present so the file sizes won't match. We already ignore file offsets when doing the comparison. rdar://124467787
Rather than including a binary, use `yaml2obj` for the duplicate section name test. rdar://124467787
This is a cherry pick of llvm#90099 |
The section type can change when using `objcopy --only-keep-debug`, apparently. rdar://124467787
b08bd82
to
a93ec79
Compare
@swift-ci Please test |
The macOS failure doesn't appear to be related to the changes in this PR. |
@swift-ci Please test macOS platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks like it should work. I don't know enough about LLDB details to feel comfortable approving though.
:-) I'm told we don't actually need this one anyway, because there's an auto merger that will take #8699 and apply it here. |
Closing as #8699 has been merged and the auto merger has done its job. |
Section unification cannot just use names, because it's valid for ELF binaries to have multiple sections with the same name. We should check other section properties too.
rdar://124467787