[6.0][LLDB][ELF] Fix section unification to not just use names.#8669
Merged
JDevlieghere merged 5 commits intoswiftlang:swift/release/6.0from May 3, 2024
Merged
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
The section type can change when using `objcopy --only-keep-debug`, apparently. rdar://124467787
Author
|
@swift-ci Please test |
Author
|
Explanation: This fixes an ELF-specific bug in LLDB where it can mis-resolve symbols in the presence of multiple sections that have the same name. |
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