+/* Static counter of number of found pdata sections. */
+static bfd_boolean pdata_count;
+
+/* Functionn prototype. */
+bfd_boolean pex64_bfd_print_pdata (bfd *, void *);
+
+/* Helper function for bfd_map_over_section. */
+static void
+pex64_print_all_pdata_sections (bfd *abfd, asection *pdata, void *obj)
+{
+ if (CONST_STRNEQ (pdata->name, ".pdata"))
+ {
+ if (pex64_bfd_print_pdata_section (abfd, obj, pdata))
+ pdata_count++;
+ }
+}
+
+bfd_boolean
+pex64_bfd_print_pdata (bfd *abfd, void *vfile)
+{
+ asection *pdata_section = bfd_get_section_by_name (abfd, ".pdata");
+
+ if (pdata_section)
+ return pex64_bfd_print_pdata_section (abfd, vfile, pdata_section);
+
+ pdata_count = 0;
+ bfd_map_over_sections (abfd, pex64_print_all_pdata_sections, vfile);
+ return (pdata_count > 0);
+}
+