diff options
author | midipix <writeonce@midipix.org> | 2025-06-10 18:32:38 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-06-10 18:32:38 +0000 |
commit | 4816ec0a1fa54e409635b11b23531eba69ba8206 (patch) | |
tree | 1fa8000efedb133ee92f7c1f4a139ad12fcd8074 | |
parent | 09166f55c8dd0c1b09c57a66cac337374e694e06 (diff) | |
download | perk-4816ec0a1fa54e409635b11b23531eba69ba8206.tar.bz2 perk-4816ec0a1fa54e409635b11b23531eba69ba8206.tar.xz |
pe_output_symbol_records_yaml(): output auxiliary records of weak externals.
-rw-r--r-- | src/output/pe_output_image_symbols.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/output/pe_output_image_symbols.c b/src/output/pe_output_image_symbols.c index 8f9abe6..34daedb 100644 --- a/src/output/pe_output_image_symbols.c +++ b/src/output/pe_output_image_symbols.c @@ -176,6 +176,29 @@ static int pe_output_symbol_records_yaml( classdesc, symrec->cs_num_of_aux_recs) < 0) return PERK_FILE_ERROR(dctx); + + if (symrec->cs_storage_class == PE_IMAGE_SYM_CLASS_WEAK_EXTERN) { + const struct pe_raw_coff_symbol * coffsym; + struct pe_meta_aux_rec_weaksym auxrec; + int idx; + + coffsym = (const struct pe_raw_coff_symbol *)symrec->cs_aux_recs; + coffsym--; + + if (pe_dprintf(fdout," - aux-rec:\n") < 0) + return PERK_SYSTEM_ERROR(dctx); + + for (idx=0; idx<symrec->cs_num_of_aux_recs; idx++) { + pe_read_aux_rec_weaksym(coffsym,&auxrec,idx); + + if (pe_dprintf(fdout, + " - [ tag-index: = %d ]\n" + " - [ tag-characteristics: = 0x%08X ]\n\n", + auxrec.aux_tag_index, + auxrec.aux_characteristics) < 0) + return PERK_SYSTEM_ERROR(dctx); + } + } } return 0; |