/* 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:
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. */
}
}
-#if defined BFD64 && !BFD_HOST_64BIT_LONG
+#if defined BFD64 && !BFD_HOST_64BIT_LONG && !BFD_HOST_64BIT_LONG_LONG
static int
print_dec_vma (bfd_vma vma, int is_signed)
{
case HEX:
#if BFD_HOST_64BIT_LONG
return nc + printf ("%lx", vma);
+#elif BFD_HOST_64BIT_LONG_LONG
+ return nc + printf ("%llx", vma);
#else
return nc + print_hex_vma (vma);
#endif
case DEC:
#if BFD_HOST_64BIT_LONG
return printf ("%ld", vma);
+#elif BFD_HOST_64BIT_LONG_LONG
+ return printf ("%lld", vma);
#else
return print_dec_vma (vma, 1);
#endif
return printf ("%5ld", vma);
else
return printf ("%#lx", vma);
+#elif BFD_HOST_64BIT_LONG_LONG
+ if (vma <= 99999)
+ return printf ("%5lld", vma);
+ else
+ return printf ("%#llx", vma);
#else
if (vma <= 99999)
return printf ("%5ld", _bfd_int64_low (vma));
case UNSIGNED:
#if BFD_HOST_64BIT_LONG
return printf ("%lu", vma);
+#elif BFD_HOST_64BIT_LONG_LONG
+ return printf ("%llu", vma);
#else
return print_dec_vma (vma, 0);
#endif
if (is_32bit_elf)
{
-#ifdef _bfd_int64_low
- printf ("%8.8lx %8.8lx ", _bfd_int64_low (offset), _bfd_int64_low (info));
-#else
- printf ("%8.8lx %8.8lx ", offset, info);
-#endif
+ printf ("%8.8lx %8.8lx ",
+ (unsigned long) offset & 0xffffffff,
+ (unsigned long) info & 0xffffffff);
}
else
{
-#ifdef _bfd_int64_low
+#if BFD_HOST_64BIT_LONG
+ printf (do_wide
+ ? "%16.16lx %16.16lx "
+ : "%12.12lx %12.12lx ",
+ offset, info);
+#elif BFD_HOST_64BIT_LONG_LONG
+ printf (do_wide
+ ? "%16.16llx %16.16llx "
+ : "%12.12llx %12.12llx ",
+ offset, info);
+#else
printf (do_wide
? "%8.8lx%8.8lx %8.8lx%8.8lx "
: "%4.4lx%8.8lx %4.4lx%8.8lx ",
_bfd_int64_low (offset),
_bfd_int64_high (info),
_bfd_int64_low (info));
-#else
- printf (do_wide
- ? "%16.16lx %16.16lx "
- : "%12.12lx %12.12lx ",
- offset, info);
#endif
}
}
if (rtype == NULL)
-#ifdef _bfd_int64_low
- printf (_("unrecognized: %-7lx"), _bfd_int64_low (type));
-#else
- printf (_("unrecognized: %-7lx"), type);
-#endif
+ printf (_("unrecognized: %-7lx"), (unsigned long) type & 0xffffffff);
else
printf (do_wide ? "%-22.22s" : "%-17.17s", rtype);
printf (" Type2: ");
if (rtype2 == NULL)
-#ifdef _bfd_int64_low
- printf (_("unrecognized: %-7lx"), _bfd_int64_low (type2));
-#else
- printf (_("unrecognized: %-7lx"), type2);
-#endif
+ printf (_("unrecognized: %-7lx"),
+ (unsigned long) type2 & 0xffffffff);
else
printf ("%-17.17s", rtype2);
printf ("\n Type3: ");
if (rtype3 == NULL)
-#ifdef _bfd_int64_low
- printf (_("unrecognized: %-7lx"), _bfd_int64_low (type3));
-#else
- printf (_("unrecognized: %-7lx"), type3);
-#endif
+ printf (_("unrecognized: %-7lx"),
+ (unsigned long) type3 & 0xffffffff);
else
printf ("%-17.17s", rtype3);