Skip to content

ObjectFile: introduce a COFF object file plugin #6853

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
May 31, 2023

Conversation

compnerd
Copy link
Member

Windows uses COFF as an object file format and PE/COFF as an executable file format. They are subtly different and certain elements of a COFF file may not be present in an executable. Introduce a new plugin to add support for the COFF object file format which is required to support loading of modules built with -gmodules. This is motivated by Swift which serialises debugging information into a PCM which is a COFF object file.

Differential Revision: https://reviews.llvm.org/D149987
Reviewed By: bulbazord

(cherry picked from commit 5014830)

Windows uses COFF as an object file format and PE/COFF as an executable
file format. They are subtly different and certain elements of a COFF
file may not be present in an executable. Introduce a new plugin to add
support for the COFF object file format which is required to support
loading of modules built with -gmodules. This is motivated by Swift
which serialises debugging information into a PCM which is a COFF object
file.

Differential Revision: https://reviews.llvm.org/D149987
Reviewed By: bulbazord

(cherry picked from commit 5014830)
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @adrian-prantl

@compnerd
Copy link
Member Author

Unfortunately, while this fixes the PCM warnings, it seems to regress the po operation. It is unclear what is going on there.

@compnerd
Copy link
Member Author

@fredriss - I'd like to pull this into the 5.9 release. It is a Windows specific path, and the only concern for non-Windows targets is to ensure that it builds (which CI should cover). This improves the usability of LLDB by avoiding a massive spew of warnings.

@compnerd compnerd requested a review from fredriss May 30, 2023 17:22
@fredriss fredriss merged commit 459a52e into swiftlang:swift/release/5.9 May 31, 2023
@compnerd compnerd deleted the coff-5.9 branch May 31, 2023 22:28
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