aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
AgeCommit message (Collapse)AuthorFilesLines
1997-01-31Fri Jan 31 10:33:07 1997 Andreas Schwab ↵Ian Lance Taylor1-0/+1
<schwab@issan.informatik.uni-dortmund.de> * objdump.c (disassemble_data): Initialize `aux.require_sec'.
1997-01-29tweak last changeIan Lance Taylor1-1/+9
1997-01-29fix copyrights, add NEWS entryIan Lance Taylor1-1/+1
1997-01-29 * objdump.c (objdump_print_value): Add skip_zeroes parameter.Ian Lance Taylor1-31/+85
Change all callers. (objdump_print_addr_with_sym): Likewise. Call objdump_print_value to print address. (objdump_print_addr): New static function. (objdump_print_address): Just call objdump_print_addr. (disassemble_bytes): Print real address, not function offset. Skip a certain number of leading zeroes. * objdump.c (disassemble_zeroes): New static variable. (usage): Mention --disassemble-zeroes. (long_options): Add "disassemble-zeroes". (disassemble_bytes): Check disassemble_zeroes. Changes requested by LSI.
1997-01-28 * objdump.c (disassemble_bytes): Don't skip zeroes if theIan Lance Taylor1-202/+474
disassembler has told us that we are in a branch delay slot.
1996-10-01 * version.c (print_version): New function.Ian Lance Taylor1-16/+8
* bucomm.h (print_version): Declare. * ar.c (program_version): Don't declare. (do_show_version): Remove. (usage): Add help parameter. Print bug report address. (main): Set is_ranlib at start. Check for --help and --version. Call print_version, not do_show_version. * nlmconv.c (program_version): Don't declare. (main): Call print_version. (show_usage): Print bug report address. * nm.c (program_version, print_version): Don't declare. (usage): Print bug report address. (main): Call print_version. * objcopy.c (program_version): Don't declare. (copy_usage): Print bug report address. (strip_usage): Likewise. (strip_main): Call print_version. (copy_main): Likewise. * objdump.c (program_version): Don't declare. (usage): Print bug report address. (main): Call print_version. * size.c (program_version): Don't declare. (usage): Print bug report address. (main): Call print_version. * strings.c (program_version): Don't declare. (main): Call print_version. (usage): Print bug report address. * Makefile.in: Update dependencies.
1996-07-22 * objdump.c (dump_section_stabs): Fix test for stabs sectionsStu Grossman1-80/+186
ending with numbers. This fixes a problem with .stab being confused with .stab.index.
1996-04-23 * objdump.c (compare_symbols): Sort symbols whose names start withIan Lance Taylor1-3/+19
`.' after other symbols. If no other decision can be made, sort symbols by name.
1996-03-29 * objdump.c (dump_section_header): Print the SEC_LINK_ONCE flagIan Lance Taylor1-2/+31
and the SEC_LINK_DUPLICATES field.
1996-03-11 * objdump.c (stab_name): Remove.Ian Lance Taylor1-51/+95
(struct stab_print): Remove. (stab_print): Remove. (dump_stabs): Don't initialize stab_name. (print_section_stabs): Call bfd_get_stab_name rather than using the stab_name array.
1996-01-27Fix up warning on SunOSMichael Meissner1-1/+1
1996-01-25shorten copyright lineIan Lance Taylor1-1/+1
1996-01-25 * objdump.c (dump_headers, dump_section_header): Change objdump -hIan Lance Taylor1-12/+20
output to be simpler and to include section file offsets.
1996-01-23 * objdump.c (disassemble_data): Pass fprintf to INIT_DISASSEMBLE_INFO.David Edelsohn1-1/+1
1996-01-23 * objdump.c (disassemble_data): Handle unknown endianness.David Edelsohn1-1/+5
1996-01-23 Add new option --show-raw-insn.David Edelsohn1-1/+13
* objdump.c (show_raw_insn): New global. (usage): Update. (long_options): Update. (disassemble_data): Set disasm_info.flags if --show-raw-insn. * objdump.c (disassemble_data): Set new arch,mach,endian fields in disasm_info.
1996-01-11update copyrightMichael Meissner1-1/+1
1996-01-11Add support for SHT_ORDERED and SHF_EXCLUDEMichael Meissner1-2/+4
1996-01-02 Implement generic debugging support. Implement a stabs reader andIan Lance Taylor1-40/+59
a generic printer. * budbg.h, debug.c, debug.h, prdbg.c, rddbg.c, stabs.c: New files. * objdump.c: Include "debug.h" and "budbg.h". (dump_debugging): New global variable. (usage): Mention --debugging. (long_options): Add "debugging". (display_bfd): Handle --debugging. * Makefile.in (OBJDUMP_OBJS): New variable. ($(OBJDUMP_PROG)): Use $(OBJDUMP_OBJS). * binutils.texi, objdump.1: Document --debugging.
1995-11-03 * objdump.c: Include <sys/types.h>.Ian Lance Taylor1-0/+1
1995-10-30 * objdump.c (objdump_print_value): New static function.Ian Lance Taylor1-15/+69
(objdump_print_address): Use it. If we need the right section for the symbol, and we can't find it, print an offset from the section rather than using a symbol from some other section. PR 8251.
1995-10-05 * objdump.c (compare_symbols): Sort gnu_compiled and gcc2_compiledIan Lance Taylor1-30/+61
symbols after other symbols with the same value. Likewise for symbols which look like file names. (objdump_print_address): Always chose the first reasonable symbol with a given value. PR 8148.
1995-09-13 * objdump.c (start_address): New variable.Ian Lance Taylor1-8/+65
(stop_address): New variable. (usage): Mention --start-address and --stop-address. (OPTION_START_ADDRESS, OPTION_STOP_ADDRESS): Define. (long_options): Add "start-address" and "stop-address". (disassemble_data): Handle start_address and stop_address. (dump_data, dump_reloc_set): Likewise. (main): Don't set seenflag for -l. Handle OPTION_START_ADDRESS and OPTION_STOP_ADDRESS. * objcopy.c (parse_vma): Move to bucomm.c. * bucomm.c (parse_vma): New function, moved in from objcopy.c. * bucomm.h (parse_vma): Declare. * binutils.texi, objdump.1: Document new objdump options. PR 7983.
1995-09-12 * objdump.c (disassemble_data): Add casts to avoid gcc warnings.Ian Lance Taylor1-5/+5
1995-08-31Thu Aug 31 16:30:22 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-20/+38
* dlltool.c (add_indirect): New. (asm_prefix): New (gen_exp_file): Timestamp should be 0. Insert prefix when needed. New code for indirection. (gen_lib_file): Timestamp should be 0. Insert prefix when needed. (usage): Document --add-indirect. (main): Cope with new option. * objdump.c (dump_private_headers): New. (usage): Document new option. (long_option): Add private-headers. (dump_bfd_private_header): New. (main): Cope with new option.
1995-06-20 * dlltool.c: Change names of generated files. .*.s-> -*.sSteve Chamberlain1-16/+42
* objdump.c (dump_section_stabs): Check for names which are supersets of selected names. binutils/7240.
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