/* Number of symbols in `dynsyms'. */
static long dynsymcount = 0;
-/* Forward declarations. */
+/* Static declarations. */
+
+static void
+usage PARAMS ((FILE *, int));
static void
display_file PARAMS ((char *filename, char *target));
static void
+dump_section_header PARAMS ((bfd *, asection *, PTR));
+
+static void
+dump_headers PARAMS ((bfd *));
+
+static void
dump_data PARAMS ((bfd *abfd));
static void
dump_symbols PARAMS ((bfd *abfd, boolean dynamic));
static void
+dump_bfd_header PARAMS ((bfd *));
+
+static void
+dump_bfd_private_header PARAMS ((bfd *));
+
+static void
display_bfd PARAMS ((bfd *abfd));
static void
+display_target_list PARAMS ((void));
+
+static void
+display_info_table PARAMS ((int, int));
+
+static void
+display_target_tables PARAMS ((void));
+
+static void
+display_info PARAMS ((void));
+
+static void
objdump_print_value PARAMS ((bfd_vma, struct disassemble_info *, boolean));
static void
static const char *
endian_string PARAMS ((enum bfd_endian));
+
+static asymbol **
+slurp_symtab PARAMS ((bfd *));
+
+static asymbol **
+slurp_dynamic_symtab PARAMS ((bfd *));
+
+static long
+remove_useless_symbols PARAMS ((asymbol **, long));
+
+static int
+compare_symbols PARAMS ((const PTR, const PTR));
+
+static int
+compare_relocs PARAMS ((const PTR, const PTR));
+
+static void
+dump_stabs PARAMS ((bfd *));
+
+static boolean
+read_section_stabs PARAMS ((bfd *, const char *, const char *));
+
+static void
+print_section_stabs PARAMS ((bfd *, const char *, const char *));
\f
static void
usage (stream, status)
secaddr = bfd_get_section_vma (abfd, sec);
if (vma < secaddr)
{
- (*info->fprintf_func) (info->stream, "-");
+ (*info->fprintf_func) (info->stream, "-0x");
objdump_print_value (secaddr - vma, info, true);
}
else if (vma > secaddr)
{
- (*info->fprintf_func) (info->stream, "+");
+ (*info->fprintf_func) (info->stream, "+0x");
objdump_print_value (vma - secaddr, info, true);
}
(*info->fprintf_func) (info->stream, ">");
objdump_print_symname (abfd, info, sym);
if (bfd_asymbol_value (sym) > vma)
{
- (*info->fprintf_func) (info->stream, "-");
+ (*info->fprintf_func) (info->stream, "-0x");
objdump_print_value (bfd_asymbol_value (sym) - vma, info, true);
}
else if (vma > bfd_asymbol_value (sym))
{
- (*info->fprintf_func) (info->stream, "+");
+ (*info->fprintf_func) (info->stream, "+0x");
objdump_print_value (vma - bfd_asymbol_value (sym), info, true);
}
(*info->fprintf_func) (info->stream, ">");
if (sorted_symcount < 1)
{
+ printf ("0x");
objdump_print_value (vma, info, skip_zeroes);
return;
}
fprintf (stderr, "%s: Can't disassemble for architecture %s\n",
program_name,
bfd_printable_arch_mach (bfd_get_arch (abfd), 0));
- exit (1);
+ return;
}
disasm_info.flavour = bfd_get_flavour (abfd);
stop = disasm_info.buffer_length;
}
- if (prefix_addresses)
- disassemble_bytes (&disasm_info, disassemble_fn, true, data, i, stop,
- &relpp, relppend);
- else
+ if(1) /* with or without prefix_addresses */
{
asymbol *sym;
long place;
else
disasm_info.symbol = NULL;
- printf ("\n");
- objdump_print_addr_with_sym (abfd, section, sym,
- section->vma + i,
- &disasm_info,
- false);
- printf (":\n");
+ if (! prefix_addresses)
+ {
+ printf ("\n");
+ objdump_print_addr_with_sym (abfd, section, sym,
+ section->vma + i,
+ &disasm_info,
+ false);
+ printf (":\n");
+ }
if (sym != NULL && bfd_asymbol_value (sym) > section->vma + i)
nextsym = sym;
static boolean
read_section_stabs (abfd, stabsect_name, strsect_name)
bfd *abfd;
- char *stabsect_name;
- char *strsect_name;
+ const char *stabsect_name;
+ const char *strsect_name;
{
asection *stabsect, *stabstrsect;
static void
print_section_stabs (abfd, stabsect_name, strsect_name)
bfd *abfd;
- char *stabsect_name;
- char *strsect_name;
+ const char *stabsect_name;
+ const char *strsect_name;
{
int i;
unsigned file_string_table_offset = 0, next_file_string_table_offset = 0;
int t, columns;
extern bfd_target *bfd_target_vector[];
char *colum;
- extern char *getenv ();
columns = 0;
colum = getenv ("COLUMNS");