Squashed 'external/ELFIO/' content from commit 94f7706

git-subtree-dir: external/ELFIO
git-subtree-split: 94f7706b5325b2ad9872e4481278278592cf86c9
This commit is contained in:
2026-05-11 11:41:03 +02:00
commit a67f311330
261 changed files with 21266 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#include <string>
#include <sstream>
#include <elfio/elfio.hpp>
#include <elfio/elfio_dump.hpp>
using namespace ELFIO;
extern "C" int LLVMFuzzerTestOneInput( const std::uint8_t* Data, size_t Size )
{
std::string str( (const char*)Data, Size );
std::istringstream ss( str );
std::ostringstream oss;
elfio elf;
if ( !elf.load( ss ) ) {
return 0;
}
dump::header( oss, elf );
dump::section_headers( oss, elf );
dump::segment_headers( oss, elf );
dump::symbol_tables( oss, elf );
dump::notes( oss, elf );
dump::modinfo( oss, elf );
dump::dynamic_tags( oss, elf );
dump::section_datas( oss, elf );
dump::segment_datas( oss, elf );
return 0;
}