+ return true;
+}
+
+struct pex64_paps
+{
+ void *obj;
+ /* Number of found pdata sections. */
+ unsigned int pdata_count;
+};
+
+/* Functionn prototype. */
+bool 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 *arg)
+{
+ struct pex64_paps *paps = arg;
+ if (startswith (pdata->name, ".pdata"))
+ {
+ if (pex64_bfd_print_pdata_section (abfd, paps->obj, pdata))
+ paps->pdata_count++;
+ }
+}
+
+bool
+pex64_bfd_print_pdata (bfd *abfd, void *vfile)
+{
+ asection *pdata_section = bfd_get_section_by_name (abfd, ".pdata");
+ struct pex64_paps paps;
+
+ if (pdata_section)
+ return pex64_bfd_print_pdata_section (abfd, vfile, pdata_section);
+
+ paps.obj = vfile;
+ paps.pdata_count = 0;
+ bfd_map_over_sections (abfd, pex64_print_all_pdata_sections, &paps);
+ return paps.pdata_count != 0;