@@ -541,7 +541,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
541541 /* virt_size might be zero for objects. */
542542 if (stop == 0 && strcmp (abfd -> xvec -> name , "pe-x86-64" ) == 0 )
543543 {
544- stop = ( datasize / onaline ) * onaline ;
544+ stop = datasize ;
545545 virt_size_is_zero = TRUE;
546546 }
547547 else if (datasize < stop )
@@ -551,8 +551,8 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
551551 _ ("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n" ),
552552 pdata_section -> name , (unsigned long ) datasize ,
553553 (unsigned long ) stop );
554- /* Be sure not to read passed datasize. */
555- stop = datasize / onaline ;
554+ /* Be sure not to read past datasize. */
555+ stop = datasize ;
556556 }
557557
558558 /* Display functions table. */
@@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
724724 altent += imagebase ;
725725
726726 if (altent >= pdata_vma
727- && (altent + PDATA_ROW_SIZE <= pdata_vma
728- + pei_section_data (abfd , pdata_section )-> virt_size ))
727+ && altent - pdata_vma + PDATA_ROW_SIZE <= stop )
729728 {
730729 pex64_get_runtime_function
731730 (abfd , & arf , & pdata [altent - pdata_vma ]);
0 commit comments