Skip to content

ObjectFile: correct Swift AST section name for PE/COFF #6705

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

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

compnerd
Copy link
Member

PE/COFF has a section name limit at 8 characters. To accommodate that we name the AST wrapping section swiftast. The ELF name (.swift_ast) was replicated here without adjustment which results in LLDB being unable to locate the modulewrap content. Match the behaviour of the compiler to allow LLDB to load the data.

PE/COFF has a section name limit at 8 characters.  To accommodate that
we name the AST wrapping section `swiftast`.  The ELF name
(`.swift_ast`) was replicated here without adjustment which results in
LLDB being unable to locate the modulewrap content.  Match the behaviour
of the compiler to allow LLDB to load the data.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@compnerd
Copy link
Member Author

(merging this as this is windows specific and tested locally as well in that it helps things)

@compnerd compnerd merged commit 4c87421 into swiftlang:swift/release/5.9 Apr 24, 2023
@compnerd compnerd deleted the wrong-section branch April 24, 2023 14:32
@@ -1015,7 +1015,7 @@ SectionType ObjectFilePECOFF::GetSectionType(llvm::StringRef sect_name,
// .eh_frame can be truncated to 8 chars.
.Cases(".eh_frame", ".eh_fram", eSectionTypeEHFrame)
.Case(".gosymtab", eSectionTypeGoSymtab)
.Case(".swift_ast", eSectionTypeSwiftModules) // downstream change
.Case("swiftast", eSectionTypeSwiftModules) // downstream change

Choose a reason for hiding this comment

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

You may need to make this change in a couple more places, including the Swift repo

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.

2 participants