[PATCH] D106940: Fix test for debug dir presence
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 18 03:58:50 PDT 2021
jhenderson added a comment.
I've skimmed the yaml2obj code and identified what I think will allow you to make a small change to support an arbitrary value for `NumberOfRvaAndSize`. The value is set in `initializeOptionalHeader`, in COFFEmitter.cpp to be `COFF::NUM_DATA_DIRECTORIES + 1`. It would be trivial to set this to a different value, derived from the input header. You'd need to provide a new `Optional` member in the PEHeader struct in COFFYAML.h, which would be populated at YAML parse time in `MappingTraits<COFFYAML::PEHeader>::mapping` and provide an override for the default value set in `initializeOptionalHeader`, if specified.
Take a look and see if you can get that to work. I think it'll be fairly straightforward.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106940/new/
https://reviews.llvm.org/D106940
More information about the llvm-commits
mailing list