aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
AgeCommit message (Collapse)AuthorFilesLines
1995-03-06 * bucomm.c (list_supported_targets): New function.Ian Lance Taylor1-127/+293
* bucomm.h (list_supported_targets): Declare. * ar.c (usage): Call list_supported_targets. * nm.c (usage): Likewise. * objcopy.c (copy_usage, strip_usage): Likewise. * objdump.c (usage): Likewise. * size.c (usage): Likewise. * strings.c (usage): Likewise. PR 6345.
1994-09-16 * objdump.c (objdump_print_address): If we can't find a smallerIan Lance Taylor1-6/+21
symbol in the right section, look for a larger one.
1994-09-16 * objdump.c (struct objdump_disasm_info): Add field require_sec.Ian Lance Taylor1-1/+5
(objdump_print_address): If aux->require_sec, require that the symbol be in aux->sec even if HAS_RELOC is not set. (disassemble_data): Set aux.require_sec around the objdump_print_address call for the instruction address. PR 3441.
1994-09-16 * objdump.c (disassemble_all): New global variable.Ian Lance Taylor1-24/+160
(usage): Document --disassemble-all. (long_options): Add disassemble-all as a synonym for -D. (compare_symbols): Make pointers const. (compare_relocs): New static function. (disassemble_data): Rename disassemble to disassemble_fn to avoid shadowing. If dump_reloc_info, print relocs along with disassembly. Skip sections which are not SEC_CODE unless disassemble_all or only is set. (display_bfd): Don't call dump_relocs if disassemble is set. (main): Accept and handle -D. * binutils.texi: Document -D/--disassemble-all. * objdump.1: Likewise. PR 5059.
1994-09-14 * objdump.c (disassemble_data): Initialize prevline to 0. MakeIan Lance Taylor1-5/+10
prev_function non const. Copy functionname into an malloc buffer when setting prev_function, instead of assuming that the string will last forever.
1994-09-13 * objdump.c (dump_section_header): Print the SEC_NEVER_LOAD flag.Ian Lance Taylor1-15/+16
1994-06-20 * objdump.c: Don't include elf/internal.h.Ian Lance Taylor1-48/+22
(bfd_elf_find_section): Don't declare. (read_section_stabs): No special handling for ELF. Always read using BFD sections.
1994-06-03 * objdump.c (display_target_list): Remove unused local ok.Ian Lance Taylor1-137/+58
1994-04-22 * objdump.c (_DUMMY_NAME_): Don't define.Ian Lance Taylor1-12/+15
(display_target_list): Use tmpnam to get a file name rather than using _DUMMY_NAME_. Unlink it when done. (display_info_table): Likewise.
1994-04-13 * objdump.c: Do an ifdef on __GO32__, not unix.Ian Lance Taylor1-3/+3
1994-04-07 Added -D (--dynamic) option to nm and -T (--dynamic-syms) and -RIan Lance Taylor1-68/+189
(--dynamic-reloc) arguments to objdump. * nm.c (dynamic): New static variable. (long_options): Added "dynamic". (usage): Mention -D and --dynamic. (main): Add D to getopt string. Handle -D by setting dynamic. (display_rel_file): If dynamic is non-zero, read dynamic symbols rather than normal symbols. * nm.1: Updated for -D (--dynamic) option. * objdump.c (dump_dynamic_symtab): New global variable. (dump_dynamic_reloc_info): New global variable. (dynsyms, dynsymcount): New global variables. (usage): Mention -R, -T, --dynamic-syms and --dynamic-reloc. (long_options): Added "dynamic-reloc" and "dynamic-syms". (slurp_symtab): If no symbols, return rather than exit. (slurp_dynamic_symtab): New function. (display_bfd): Handle dump_dynamic_symtab and dump_dynamic_reloc_info. (dump_symbols): Take new dynamic argument, indicating whether to display dynamic symbols. (dump_relocs): Move most printing into dump_reloc_set. (dump_dynamic_relocs): New function. (dump_reloc_set): New function, extracted from dump_relocs. (main): Add R and T to getopt string. Handle -T by setting dump_dynamic_symtab and -R by setting dump_dynamic_reloc_info. * objdump.1: Updated for -R (--dynamic-reloc) and -T (--dynamic-syms) options. * binutils.texi: Updated for new nm and objdump options.
1994-03-30 Update for recent BFD changes to symbol and reloc reading. RenameIan Lance Taylor1-22/+33
all uses of get_symtab_upper_bound to bfd_get_symtab_upper_bound. Also: * coffgrok.c (symcount): Change to long. (do_sections_p1): Check for error return from bfd_get_reloc_upper_bound. Change relcount to long, and check for error from bfd_canonicalize_reloc. (coff_grok): Change storage to long. Check for error from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * nlmconv.c (main): Change symcount, newsymalloc, newsymcount, and i to long. Check for error from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. (copy_sections): Change reloc_size and reloc_count to long. Check for error from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. (mangle_relocs, i386_mangle_relocs, alpha_mangle_relocs): Change reloc_count_ptr argument to long *. Make corresponding changes to variables loaded from *reloc_count_ptr. * nm.c (display_rel_file): Change storage and symcount to long. Check for errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * objcopy.c (filter_symbols): Change symcount, src_count and dst_count to long. (copy_object): Change symcount to long. Pass another argument to fprintf. Check for errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. (copy_section): Change relcount to long. Check for errors from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. (mark_symbols_used_in_relocations): Change relcount and i to long. Check for errors form bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. * objdump.c (storage): Remove global variable. (symcount): Changed to long. (slurp_symtab): New local variable storage. Check for errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. (remove_useless_symbols): Change return value and count to long. (objdump_print_address): Change min, max, thisplace and i to long. (disassemble_data): Change i to long. (dump_symbols): Change count to long. (dump_relocs): Change relcount to long. Check for errors from bfd_ret_reloc_upper_bound and bfd_canonicalize_reloc. (display_info_table): Add casts when passing LONGEST_ARCH for printf %* argument.
1994-03-29 * objdump.c (display_file): Close each archive element after itIan Lance Taylor1-41/+57
has been displayed.
1994-02-03 * objdump.c (dump_section_stabs, read_section_stabs,David MacKenzie1-61/+90
print_section_stabs): Functions broken out of dump_stabs_1. Free the stabs and strings when done with them.
1994-02-03 * nlmconv.c (main), objcopy.c (copy_file): Print matching formatsDavid MacKenzie1-108/+92
if ambiguous match. * nm.c (display_file), size.c (display_bfd): Eliminate gotos. Print matching formats if there is an ambiguous match. Use bfd_nonfatal instead of hardcoded error message if nothing matches. * arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of abfd->filename. * nm.c (display_archive): New function, from code in display_file. (display_rel_file): Renamed from do_one_rel_file. * size.c: Indent. (display_archive): New function from code in display_file. (display_file): Check bfd_close error return. * strings.c (strings_object_file): Check bfd_check_format error return. * strings.c, objdump.c, size.c: Use bfd_nonfatal instead of bfd_perror. * bucomm.c: Delete references to exit_handler. It wasn't set anywhere, and now that we're using the libiberty xmalloc, it wouldn't always get called before exiting. (list_matching_formats): Function moved from objdump.c. * bucomm.h: Declare it. * objdump.c (disassemble_data): Move some variable decls closer to their use. Add some comments. Replace a nested block with a return.
1994-02-01Mon Jan 31 18:50:41 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-0/+15
* objdump.c (display_target_list, display_info_table): Check that the bfd of the dummy output file is not null.
1994-01-26 * objcopy.c (filter_bytes): New function.David MacKenzie1-222/+271
(copy_section): Call it. (copy_options, copy_usage, copy_main): Add --byte option to activate it. Appropriate the -b option (which was an undocumented synonym for -F) for it, also. Add --interleave, -i option for additional control. (setup_section, copy_section, mangle_section): Renamed with no `s' on the end. * objcopy.1, binutils.texi: Document the new options. * objdump.c (display_target_tables, display_target_list): New functions broken out of display_info. Eliminate some magic constants. Use more meaningful variable names. (dump_bfd_header): New function broken out of display_bfd. (dump_section_header): New function broken out of dump_headers. (remove_useless_symbols): Don't shadow global variable name with parameter. (objdump_print_address): Fix backward test.
1994-01-25 * objdump.c (display_file): Remove call to list_matching_formats.David MacKenzie1-18/+17
It would never be called. (list_matching_formats): Take an arg giving the list of matching formats. (display_bfd): Pass the arg, and get it filled in by calling bfd_check_format_matches instead of bfd_check_format. (display_info, display_info_table): target_vector was renamed to bfd_target_vector.
1994-01-24 * objdump.c (display_file): Remove call to list_matching_formats.David MacKenzie1-7/+9
It would never be called. (list_matching_formats): Take an arg giving the list of matching formats. (display_bfd): Pass the arg, and get it filled in by calling bfd_check_format_matches instead of bfd_check_format. * binutils.texi (objdump): Note some limitations of -h section address printing.
1994-01-23Minor MPW compatibility tweaks.Stan Shebs1-4/+5
1994-01-22 * objdump.c (list_matching_formats): If the file format is ambiguous,David MacKenzie1-7/+21
print the matching names so the user can choose one. (display_bfd): Call it. (display_file): Call it.
1994-01-22 * objdump.c (disassemble_data): Support bfd_arch_rs6000.Ian Lance Taylor1-0/+6
1994-01-17Mon Jan 17 13:57:25 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-15/+18
* objdump.c (stab_name): Allocate dynamically. (stab_print): Use pointers to strings instead of char arrays. (dump_stabs): Change alloc and init of arrays appropriately. (dump_stabs_1): Always decide whether to print stab_name or the stab's type number, if unnamed.
1994-01-13 * objdump.c (dump_relocs): Don't crash if section name is NULL.Ian Lance Taylor1-33/+42
1993-10-29Rename a variable that conflicts with LynxStan Shebs1-14/+15
1993-10-22hide declaration of fprintf inside FPRINTF_ALREADY_DECLARED, becauseMark Eichin1-0/+3
this declaration can be wrong but there must *be* a declaration for include/dis-asm.h to work.
1993-09-23 * objdump.c (usage): Mention --stabs.Ian Lance Taylor1-59/+74
1993-08-31* objdump.c (ARCH_all): Define ARCH_hppa too.Ken Raeburn1-34/+173
(dump_headers): Don't test for SEC_BALIGN if it's not defined by bfd.h. (The latter is done with #ifdef in case it turns out SEC_BALIGN has to be put back. I didn't *see* any uses of it besides this one, though.)
1993-07-15 * objdump.c (disassemble_data): Handle the m88k.Ian Lance Taylor1-22/+29
(display_bfd): Use bfd_errmsg, rather than just claiming that the bfd is not an object file.
1993-06-26Elf bfd routines and types are now size-independent again.Ken Raeburn1-6/+14
1993-06-18 * objdump.c (syms2): Removed unused variable.Per Bothner1-86/+66
* objdump.c (remove_useless_symbols): New function. * objdump.c (comp): Simplify. * objdump.c (dis-assemble_data): Make simpler and more efficient how we filter out useless symbols: Just filter BEFORE the sort (using remove_useless_symbols). * objdump.c (objdump_print_address): Simplify. Change output syntax to match gdb.
1993-05-25elf32 updatesKen Raeburn1-4/+4
1993-05-25Makefile.in (DISTSTUFF): Don't build binutils.mm.Ken Raeburn1-3/+8
objdump.c (slurp_symtab): Print warning for bad symbol table.
1993-04-29Clean up usage messages and option parsers.David MacKenzie1-8/+13
Add program name to some error messages.
1993-04-27Support for the SH.Steve Chamberlain1-0/+7
1993-04-09Please don't add declarations of random system functions to generalIan Lance Taylor1-16/+15
source files if you can possibly avoid it. They inevitably fail on some system somewhere. * objdump.c: Removed useless fprintf declaration.
1993-04-01merge binutils and gdb sparc disassemblersJim Kingdon1-2/+1
1993-03-31provide a new interface (using read_memory_func) to call the disassemblersJim Kingdon1-4/+12
which copes with errors in a plausible way
1993-03-29objdump.c: Use correct prototype of fprintf, else it won't compile on ANSIKen Raeburn1-1/+4
C systems.
1993-03-19mention long options in usage messageJim Kingdon1-2/+3
1993-03-19 * m68k-pinsn.c: Removed. Subsumed by ../opcodes/m68k-dis.c.Per Bothner1-30/+38
* i386-pinsn.c: Removed. Subsumed by ../opcodes/i386-dis.c. * Makefile.in: Adjust accordingly. * objdump.c: Support new-style disassemblers (ones that use the interface of ../include/dis-asm.h).
1993-02-22from minyard@bnr.ca: free up copy of section contents each time through loopKen Raeburn1-45/+83
1992-08-19Added +version (-V) option to print version number.Rob Savoye1-23/+71
1992-06-13LintJohn Gilmore1-4/+4
1992-06-11New feature: --stabs prints out a .stab section from an ELF file.John Gilmore1-2/+142
Installed under #ifdef ELF_STAB_DISPLAY so it can be easily disabled, since it requires bfd-internals header files and such.
1992-06-10Wed Jun 10 07:53:24 1992 Steve Chamberlain (sac@thepub.cygnus.com)Steve Chamberlain1-506/+600
* objdump.c(display_info), patches from mohring@informatik.tu-muenchen.de to print the table much more nicely.
1992-05-01Add support for 386 disassemblySteve Chamberlain1-33/+39
1992-02-06 * objdump.c (disassemble_data): don't print a section's contentsSteve Chamberlain1-41/+44
if it's not loadable (eg bss)
1992-01-24 * copy.c, nm.c, objdump.c, size.c : changed to use theSteve Chamberlain1-94/+98
new reloc scheme.
1991-10-05Cope with renames of a few BFD types & enums.John Gilmore1-90/+113