[LLDB][ELF] Fix section unification to not just use names.#8661
Closed
al45tair wants to merge 5 commits intoswiftlang:stable/20230725from
Closed
[LLDB][ELF] Fix section unification to not just use names.#8661al45tair wants to merge 5 commits intoswiftlang:stable/20230725from
al45tair wants to merge 5 commits intoswiftlang:stable/20230725from
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
Author
|
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
Author
|
@swift-ci Please test |
Author
|
The macOS failure doesn't appear to be related to the changes in this PR. |
Author
|
@swift-ci Please test macOS platform |
etcwilde
reviewed
May 3, 2024
Member
etcwilde
left a comment
There was a problem hiding this comment.
I think this looks like it should work. I don't know enough about LLDB details to feel comfortable approving though.
Author
|
:-) 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. |
Author
|
Closing as #8699 has been merged and the auto merger has done its job. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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