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
+ 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,
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "progress.h"
-#include "bucomm.h"
-#include "budemang.h"
#include "getopt.h"
#include "aout/stab_gnu.h"
#include "aout/ranlib.h"
#include "libiberty.h"
#include "elf-bfd.h"
#include "elf/common.h"
+#include "bucomm.h"
/* When sorting by size, we use this structure to hold the size and a
pointer to the minisymbol. */
/* Print formats for printing a symbol value. */
static char value_format_32bit[] = "%08lx";
+#if BFD_HOST_64BIT_LONG
static char value_format_64bit[] = "%016lx";
+#elif BFD_HOST_64BIT_LONG_LONG
+static char value_format_64bit[] = "%016llx";
+#endif
static int print_width = 0;
static int print_radix = 16;
/* Print formats for printing stab info. */
else
print_radix = 8;
value_format_32bit[4] = *radix;
+#if BFD_HOST_64BIT_LONG
value_format_64bit[5] = *radix;
+#elif BFD_HOST_64BIT_LONG_LONG
+ value_format_64bit[6] = *radix;
+#endif
other_format[3] = desc_format[3] = *radix;
break;
default:
{
if (do_demangle && *name)
{
- char *res = demangle (abfd, name);
+ char *res = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
- printf (format, res);
- free (res);
- return;
+ if (res != NULL)
+ {
+ printf (format, res);
+ free (res);
+ return;
+ }
}
printf (format, name);
if (keep)
{
- memcpy (to, from, size);
+ if (to != from)
+ memcpy (to, from, size);
to += size;
}
}
break;
case 64:
-#if BFD_HOST_64BIT_LONG
+#if BFD_HOST_64BIT_LONG || BFD_HOST_64BIT_LONG_LONG
printf (value_format_64bit, val);
#else
/* We have a 64 bit value to print, but the host is only 32 bit. */