[llvm] [SystemZ][z/OS] Implement yaml2obj for GOFF Object File Format (PR #71445)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 01:37:05 PST 2023


https://github.com/jh7370 commented:

Thanks for the patch. I've skimmed through it and noted a number of nits. A GOFF expert will want to review the core functionality. Some high-level comments:

1) Could this be broken into smaller pieces of incremental functionality? For example, could you start with an object with a file header and no symbols/sections etc?
2) From experience with ELF yaml2obj, to facilitate testing edge cases, it's important to be able to customise as much as possible. For example, I noted one case where you say you follow a strict order of components. It's not likely important to be able to change that order at this point, but if the components don't HAVE to be in that order, you should consider whether your code is flexible enough to allow changing it based on user input at runtime.
3) To avoid unnecessarily large chunks of boiler plate YAML, try to provide reasonable defaults wherever possible. So prefer `mapOptional` over `mapRequired` wherever possible, and auto-generate values either with fixed values (e.g. 0) or derived from the rest of the content.
4) Try to be as tolerant as possible of "invalid" input: if it doesn't actively prevent generating an object file, then it's important to allow it as otherwise you may not be able to use the tool to generate test inputs that exercise error paths in llvm-readobj.

https://github.com/llvm/llvm-project/pull/71445


More information about the llvm-commits mailing list