From 89d046e54e223d45f91b7a564c743dfdcee42ce4 Mon Sep 17 00:00:00 2001 From: Justin Rivera Date: Wed, 4 Nov 2026 20:55:58 +0000 Subject: [PATCH] Add `IsLittleEndian: true` to Mach-O yaml2obj test inputs LLVM https://github.com/llvm/llvm-project/pull/238122 ("[ObjectYAML][MachO] Require IsLittleEndian") makes the top-level `IsLittleEndian` key of a Mach-O YAML document required. Without it, yaml2obj fails on the tests/macho inputs with "missing required key 'IsLittleEndian'". Older yaml2obj versions already accept the key as optional, so this change is compatible both before and after the LLVM change. Co-authored-by: Ivan Tadeu Ferreira Antunes Filho --- tests/macho/archs.test | 3 +++ tests/macho/dsym-loading.test | 2 ++ tests/macho/inlines.test | 2 ++ tests/macho/no-dsym.test | 1 + 4 files changed, 8 insertions(+) diff --git a/tests/macho/archs.test b/tests/macho/archs.test index a8374b44..5fa897a2 100644 --- a/tests/macho/archs.test +++ b/tests/macho/archs.test @@ -56,6 +56,7 @@ FatArchs: align: 12 Slices: - !mach-o + IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x1000007 @@ -124,6 +125,7 @@ Slices: - ' ' - _main - !mach-o + IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x100000C @@ -194,6 +196,7 @@ Slices: ## Single x86_64 Mach-O executable --- !mach-o +IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x1000007 diff --git a/tests/macho/dsym-loading.test b/tests/macho/dsym-loading.test index f10d7734..62572f5e 100644 --- a/tests/macho/dsym-loading.test +++ b/tests/macho/dsym-loading.test @@ -36,6 +36,7 @@ ## Minimal Mach-O executable --- !mach-o +IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x100000C @@ -331,6 +332,7 @@ LinkEditData: ## dSYM file with DWARF debug info --- !mach-o +IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x100000C diff --git a/tests/macho/inlines.test b/tests/macho/inlines.test index 33147563..5aad3f93 100644 --- a/tests/macho/inlines.test +++ b/tests/macho/inlines.test @@ -24,6 +24,7 @@ ## Minimal Mach-O executable with inline functions --- !mach-o +IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x100000C @@ -319,6 +320,7 @@ LinkEditData: ... --- !mach-o +IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x100000C diff --git a/tests/macho/no-dsym.test b/tests/macho/no-dsym.test index 469f9584..4ece6194 100644 --- a/tests/macho/no-dsym.test +++ b/tests/macho/no-dsym.test @@ -19,6 +19,7 @@ ## Minimal Mach-O executable --- !mach-o +IsLittleEndian: true FileHeader: magic: 0xFEEDFACF cputype: 0x100000C