/***************************************************************/ /* perk: PE Resource Kit */ /* Copyright (C) 2015--2025 SysDeer Technologies, LLC */ /* Released under GPLv2 and GPLv3; see COPYING.PERK. */ /***************************************************************/ #include #include #include #include #include #include "perk_reader_impl.h" #include "perk_driver_impl.h" #include "perk_dprintf_impl.h" #include "perk_errinfo_impl.h" int pe_output_image_symbols( const struct pe_driver_ctx * dctx, const struct pe_image_meta * meta) { int fdout; struct pe_meta_coff_symbol * symrec; const char * dash = ""; fdout = pe_driver_fdout(dctx); if (dctx->cctx->fmtflags & PERK_PRETTY_YAML) { if (pe_dprintf(fdout,"symbols:\n") < 0) return PERK_FILE_ERROR(dctx); dash = "- "; } for (symrec=meta->m_symtbl; symrec->cs_name; symrec++) if (pe_dprintf(fdout,"%s%s\n",dash,symrec->cs_name) < 0) return PERK_FILE_ERROR(dctx); return 0; }