/* Coff file dumper.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007,
+ 2011 Free Software Foundation, Inc.
This file is part of GNU Binutils.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at
+ the Free Software Foundation; either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful,
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
/* Written by Steve Chamberlain <sac@cygnus.com>
This module reads a type tree generated by coffgrok and prints
it out so we can test the grokker. */
+#include "sysdep.h"
#include "bfd.h"
+#include "bfd_stdint.h"
#include "libiberty.h"
+#include "bucomm.h"
#include "coffgrok.h"
-#include "bucomm.h"
#include "getopt.h"
static int atnl;
if (p)
{
tab (1);
- printf ("List of blocks %lx ",(unsigned long) p);
+ printf ("List of blocks %" BFD_VMA_FMT "x ",(bfd_vma) (uintptr_t) p);
if (p->sec)
printf( " %s %x..%x", p->sec->name,p->offset, p->offset + p->size -1);
printf ("Coff dump");
nl ();
- printf ("#souces %d", ptr->nsources);
+ printf ("#sources %d", ptr->nsources);
nl ();
dump_coff_sfile (ptr->source_head);
show_usage (FILE *file, int status)
{
fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
- fprintf (file, _(" Print a human readable interpretation of a SYSROFF object file\n"));
+ fprintf (file, _(" Print a human readable interpretation of a COFF object file\n"));
fprintf (file, _(" The options are:\n\
+ @<file> Read options from <file>\n\
-h --help Display this information\n\
-v --version Display the program's version\n\
\n"));
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
program_name = av[0];
xmalloc_set_program_name (program_name);
+ expandargv (&ac, &av);
+
while ((opt = getopt_long (ac, av, "HhVv", long_options,
(int *) NULL))
!= EOF)