+2001-08-10 H.J. Lu <hjl@gnu.org>
+
+ * nm.c (print_value): Add one arg, bfd *.
+ (print_value): Replace fprintf_vma with bfd_fprintf_vma.
+ (print_symbol_info_bsd): Also pass `abfd' to print_value ().
+ (print_symbol_info_sysv): Likewise.
+ (print_symbol_info_posix): Likewise.
+
+ * objdump.c (dump_section_header): Replace printf_vma with
+ bfd_printf_vma.
+ (print_section_stabs): Likewise.
+ (dump_bfd_header): Likewise.
+ (objdump_print_value): Replace sprintf_vma with
+ bfd_sprintf_vma.
+ (disassemble_bytes): Likewise.
+ (dump_reloc_set): Likewise.
+
2001-08-10 Andreas Jaeger <aj@suse.de>
* configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
static void
-print_value PARAMS ((bfd_vma));
+print_value PARAMS ((bfd *, bfd_vma));
static void
print_symbol_info_bsd PARAMS ((symbol_info * info, bfd * abfd));
/* Print a symbol value. */
static void
-print_value (val)
+print_value (abfd, val)
+ bfd *abfd;
bfd_vma val;
{
#if ! defined (BFD64) || BFD_HOST_64BIT_LONG
#else
/* We have a 64 bit value to print, but the host is only 32 bit. */
if (print_radix == 16)
- fprintf_vma (stdout, val);
+ bfd_fprintf_vma (abfd, stdout, val);
else
{
char buf[30];
printf (" ");
}
else
- print_value (info->value);
+ print_value (abfd, info->value);
printf (" %c", info->type);
if (info->type == '-')
{
if (bfd_is_undefined_symclass (info->type))
printf (" "); /* Value */
else
- print_value (info->value);
+ print_value (abfd, info->value);
printf ("| %c |", info->type); /* Class */
if (info->type == '-')
{
if (bfd_is_undefined_symclass (info->type))
printf (" ");
else
- print_value (info->value);
+ print_value (abfd, info->value);
/* POSIX.2 wants the symbol size printed here, when applicable;
BFD currently doesn't provide it, so we take the easy way out by
considering it to never be applicable. */
printf ("%3d %-13s %08lx ", section->index,
bfd_get_section_name (abfd, section),
(unsigned long) bfd_section_size (abfd, section) / opb);
- printf_vma (bfd_get_section_vma (abfd, section));
+ bfd_printf_vma (abfd, bfd_get_section_vma (abfd, section));
printf (" ");
- printf_vma (section->lma);
+ bfd_printf_vma (abfd, section->lma);
printf (" %08lx 2**%u", section->filepos,
bfd_get_section_alignment (abfd, section));
if (! wide_output)
{
char buf[30];
char *p;
+ struct objdump_disasm_info *aux
+ = (struct objdump_disasm_info *) info->application_data;
- sprintf_vma (buf, vma);
+ bfd_sprintf_vma (aux->abfd, buf, vma);
if (! skip_zeroes)
p = buf;
else
char buf[30];
char *s;
- sprintf_vma (buf, section->vma +
- bfd_section_size (section->owner, section) / opb);
+ bfd_sprintf_vma
+ (aux->abfd, buf,
+ (section->vma
+ + bfd_section_size (section->owner, section) / opb));
s = buf;
while (s[0] == '0' && s[1] == '0' && s[2] == '0' && s[3] == '0'
&& s[4] == '0')
{
char *s;
- sprintf_vma (buf, section->vma + addr_offset);
+ bfd_sprintf_vma (aux->abfd, buf, section->vma + addr_offset);
for (s = buf + skip_addr_chars; *s == '0'; s++)
*s = ' ';
if (*s == '\0')
putchar ('\n');
j = addr_offset * opb + pb;
- sprintf_vma (buf, section->vma + j / opb);
+ bfd_sprintf_vma (aux->abfd, buf, section->vma + j / opb);
for (s = buf + skip_addr_chars; *s == '0'; s++)
*s = ' ';
if (*s == '\0')
else
printf ("%-6d", type);
printf (" %-6d %-6d ", other, desc);
- printf_vma (value);
+ bfd_printf_vma (abfd, value);
printf (" %-6lu", strx);
/* Symbols with type == 0 (N_UNDF) specify the length of the
PF (D_PAGED, "D_PAGED");
PF (BFD_IS_RELAXABLE, "BFD_IS_RELAXABLE");
printf (_("\nstart address 0x"));
- printf_vma (abfd->start_address);
+ bfd_printf_vma (abfd, abfd->start_address);
printf ("\n");
}
\f
if (width == 0)
{
char buf[30];
- sprintf_vma (buf, (bfd_vma) -1);
+ bfd_sprintf_vma (abfd, buf, (bfd_vma) -1);
width = strlen (buf) - 7;
}
printf ("OFFSET %*s TYPE %*s VALUE \n", width, "", 12, "");
}
if (sym_name)
{
- printf_vma (q->address);
+ bfd_printf_vma (abfd, q->address);
if (q->howto->name)
printf (" %-16s ", q->howto->name);
else
{
if (section_name == (CONST char *) NULL)
section_name = "*unknown*";
- printf_vma (q->address);
+ bfd_printf_vma (abfd, q->address);
printf (" %-16s [%s]",
q->howto->name,
section_name);
if (q->addend)
{
printf ("+0x");
- printf_vma (q->addend);
+ bfd_printf_vma (abfd, q->addend);
}
printf ("\n");
}