diff options
-rw-r--r-- | llvm/lib/Object/ELFYAML.cpp | 2 | ||||
-rw-r--r-- | llvm/test/Object/obj2yaml.test | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Object/ELFYAML.cpp b/llvm/lib/Object/ELFYAML.cpp index 56eb374af23..72c232c3287 100644 --- a/llvm/lib/Object/ELFYAML.cpp +++ b/llvm/lib/Object/ELFYAML.cpp @@ -629,7 +629,7 @@ static void sectionMapping(IO &IO, ELFYAML::RawContentSection &Section) { static void sectionMapping(IO &IO, ELFYAML::NoBitsSection &Section) { commonSectionMapping(IO, Section); - IO.mapRequired("Size", Section.Size); + IO.mapOptional("Size", Section.Size, Hex64(0)); } static void sectionMapping(IO &IO, ELFYAML::RelocationSection &Section) { diff --git a/llvm/test/Object/obj2yaml.test b/llvm/test/Object/obj2yaml.test index a9d39c8cb56..8054b23eb56 100644 --- a/llvm/test/Object/obj2yaml.test +++ b/llvm/test/Object/obj2yaml.test @@ -324,7 +324,6 @@ ELF-MIPS64EL-NEXT: - Name: .bss ELF-MIPS64EL-NEXT: Type: SHT_NOBITS ELF-MIPS64EL-NEXT: Flags: [ SHF_WRITE, SHF_ALLOC ] ELF-MIPS64EL-NEXT: AddressAlign: 0x0000000000000010 -ELF-MIPS64EL-NEXT: Size: 0x0000000000000000 ELF-MIPS64EL-NEXT: - Name: .MIPS.options ELF-MIPS64EL-NEXT: Type: SHT_MIPS_OPTIONS ELF-MIPS64EL-NEXT: Flags: [ SHF_ALLOC ] |