This implements the parsing of the highly PE-COFF specific option
in ConfigManager.cpp, setting Optional<> values in COFFConfig, which
then are used in COFFObjcopy.
This should fix https://github.com/mstorsjo/llvm-mingw/issues/239.
Differential D116556
[llvm-objcopy] Implement the PE-COFF specific --subsystem option mstorsjo on Jan 3 2022, 1:55 PM. Authored by
Details This implements the parsing of the highly PE-COFF specific option This should fix https://github.com/mstorsjo/llvm-mingw/issues/239.
Diff Detail
Event Timeline
Comment Actions Improve test coverage; test for various error cases, test for specifying only a major version.
Comment Actions Please update the llvm-objcopy documentation too.
Comment Actions Mention the new option in the docs. Lowercase an error message. Add a test for erroring out on object files. Spell out the type instead of using auto.
Comment Actions LGTM, with one final suggestion.
Comment Actions Check the full exact filename in the error message. Changed to print the output filename instead of the input filename, for the error. |
Should the terminology "object files" actually be "relocatable object files"? At least for ELF, al ELF files are object files, whether executable or not (I don't know if the same applies for COFF though).
Regardless, it would be good if this error message contained the offending file's name.