diff options
author | svnmir <svnmir@FreeBSD.org> | 2015-08-07 23:01:46 +0000 |
---|---|---|
committer | svnmir <svnmir@FreeBSD.org> | 2015-08-07 23:01:46 +0000 |
commit | c5dd590220d0afe971d065bfe9324f549dd00968 (patch) | |
tree | 52d1861acda1205241ee35a94aa63129c604d469 /lib/Object/ELFYAML.cpp | |
parent | d2fc7c7001ed3babcd0106d15dd70224abfb6f29 (diff) | |
download | FreeBSD-src-c5dd590220d0afe971d065bfe9324f549dd00968.zip FreeBSD-src-c5dd590220d0afe971d065bfe9324f549dd00968.tar.gz |
Vendor import of llvm trunk r242221:
https://llvm.org/svn/llvm-project/llvm/trunk@242221
Diffstat (limited to 'lib/Object/ELFYAML.cpp')
-rw-r--r-- | lib/Object/ELFYAML.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Object/ELFYAML.cpp b/lib/Object/ELFYAML.cpp index ecdd468..72c232c 100644 --- a/lib/Object/ELFYAML.cpp +++ b/lib/Object/ELFYAML.cpp @@ -627,6 +627,11 @@ static void sectionMapping(IO &IO, ELFYAML::RawContentSection &Section) { IO.mapOptional("Size", Section.Size, Hex64(Section.Content.binary_size())); } +static void sectionMapping(IO &IO, ELFYAML::NoBitsSection &Section) { + commonSectionMapping(IO, Section); + IO.mapOptional("Size", Section.Size, Hex64(0)); +} + static void sectionMapping(IO &IO, ELFYAML::RelocationSection &Section) { commonSectionMapping(IO, Section); IO.mapOptional("Relocations", Section.Relocations); @@ -682,6 +687,11 @@ void MappingTraits<std::unique_ptr<ELFYAML::Section>>::mapping( Section.reset(new ELFYAML::Group()); groupSectionMapping(IO, *cast<ELFYAML::Group>(Section.get())); break; + case ELF::SHT_NOBITS: + if (!IO.outputting()) + Section.reset(new ELFYAML::NoBitsSection()); + sectionMapping(IO, *cast<ELFYAML::NoBitsSection>(Section.get())); + break; case ELF::SHT_MIPS_ABIFLAGS: if (!IO.outputting()) Section.reset(new ELFYAML::MipsABIFlags()); |