[llvm] [yaml2obj][obj2yaml][objdump] Handle MIPS COFF files (PR #112591)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 00:29:27 PDT 2024
================
@@ -343,6 +343,98 @@
# COFF-ARM64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
# COFF-ARM64-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+# RUN: obj2yaml %p/Inputs/trivial-object-test.coff-mips | FileCheck %s --check-prefix COFF-MIPS
----------------
jh7370 wrote:
We try to avoid pre-canned binaries in new tests, due to a) their opaqueness, making it hard/impossible to properly review and regenerate in the future, b) security concerns (it could do anything and be "accidentally" executed during build time - see https://discourse.llvm.org/t/ideas-for-removing-test-binaries-from-the-git-repo/81480 for more discussion), and c) the impact they have on the .git repo size.
With obj2yaml/yaml2obj, it's common for us to just have a round-trip test, i.e. start with a YAML doc, convert it to an object using yaml2obj, then convert it back using obj2yaml. If we have llvm-readobj support for a feature already, we'll add some checking with that of the object created by yaml2obj too. Presumably there's nothing particularly special about MIPS COFF beyond the machine and relocation types?
Finally, I'd consider putting this testing in its own file in the newer obj2yaml testsuite at tests/tools/obj2yaml, rather than adding to this outdated test file (that's in the wrong place and is a bit of an unfocused "soup" of a test.
https://github.com/llvm/llvm-project/pull/112591
More information about the llvm-commits
mailing list