+ listing_page (0);
+
+ for (ptr = symbol_rootP; ptr != (symbolS *) NULL; ptr = symbol_next (ptr))
+ {
+ if (ptr->sy_frag->line)
+ {
+ if (S_GET_NAME (ptr))
+ {
+ char buf[30], fmt[8];
+ valueT val = S_GET_VALUE (ptr);
+
+ /* @@ Note that this is dependent on the compilation options,
+ not solely on the target characteristics. */
+ if (sizeof (val) == 4 && sizeof (int) == 4)
+ sprintf (buf, "%08lx", (unsigned long) val);
+ else if (sizeof (val) <= sizeof (unsigned long))
+ {
+ sprintf (fmt, "%%0%lulx",
+ (unsigned long) (sizeof (val) * 2));
+ sprintf (buf, fmt, (unsigned long) val);
+ }
+#if defined (BFD64)
+ else if (sizeof (val) > 4)
+ {
+ char buf1[30];
+ sprintf_vma (buf1, val);
+ strcpy (buf, "00000000");
+ strcpy (buf + 8 - strlen (buf1), buf1);
+ }
+#endif
+ else
+ abort ();
+
+ if (!got_some)
+ {
+ fprintf (list_file, "DEFINED SYMBOLS\n");
+ on_page++;
+ got_some = 1;
+ }
+
+ fprintf (list_file, "%20s:%-5d %s:%s %s\n",
+ ptr->sy_frag->line->file->filename,
+ ptr->sy_frag->line->line,
+ segment_name (S_GET_SEGMENT (ptr)),
+ buf, S_GET_NAME (ptr));
+
+ on_page++;
+ listing_page (0);
+ }
+ }
+
+ }
+ if (!got_some)