- put_vma (core_bfd, sym->bb_addr[i], (bfd_byte *) & addr);
- bfd_put_32 (core_bfd, sym->bb_calls[i], (bfd_byte *) & ncalls);
-
- if (fwrite (&addr, sizeof (addr), 1, ofp) != 1
- || fwrite (&ncalls, sizeof (ncalls), 1, ofp) != 1)
+ if (gmon_io_write_vma (ofp, sym->bb_addr[i])
+ || gmon_io_write_vma (ofp, (bfd_vma) sym->bb_calls[i]))