summaryrefslogtreecommitdiff
path: root/binutils/objdump.c
Commit message (Collapse)AuthorAgeFilesLines
* PR binutils/16024Nick Clifton2013-10-091-6/+5
| | | | | | * objdump.c (usage): Mark as a no-return function. (main): Add comment explaining why a break statement is not needed.
* PR binutils/15818Andreas Schwab2013-08-121-21/+23
| | | | | * objdump.c (disassemble_section): Return early if nothing from this section needs to be disassembled.
* * objdump.c (dump_target_specific): Fix NULL pointer test.Alan Modra2013-01-171-1/+1
|
* binutils/Cary Coutant2012-10-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * dwarf.c (do_debug_addr, do_debug_cu_index): New global flags. (load_debug_info): Fix typo. (cu_tu_indexes_read, shndx_pool, shndx_pool_size, shndx_pool_used): New global variables. (prealloc_cu_tu_list, add_shndx_to_cu_tu_entry, end_cu_tu_entry) (process_cu_tu_index, load_cu_tu_indexes, find_cu_tu_set) (display_cu_index): New functions. (dwarf_select_sections_by_names): Add "debug_addr", "cu_index". Sort entries alphabetically. (dwarf_select_sections_all): Set do_debug_addr, do_debug_cu_index. (debug_displays): Add .debug_cu_index, .debug_tu_index. Clean up formatting. * dwarf.h (dwarf_section_display_enum): Add dwp_cu_index, dwp_tu_index. (do_debug_addr, do_debug_cu_index): New global flags. (find_cu_tu_set): New function declaration. * objdump.c (usage): Add --dwarf=addr, --dwarf=cu_index. * readelf.c (find_section_in_set): New function. (usage): Add --debug-dump=addr, --debug_dump=cu_index. (process_section_headers): Check do_debug_addr and do_debug_cu_index. (section_subset): New global variable. (load_debug_section): Restrict search to section subset. (display_debug_section): Add section index as paramter. Select subset of sections when dumping a .dwp file. Update caller.
* Handle x32 in dump_dwarfH.J. Lu2012-10-211-0/+2
| | | | | * objdump.c (dump_dwarf): Handle bfd_mach_x64_32 and bfd_mach_x64_32_intel_syntax.
* bfd/Alan Modra2012-10-211-7/+1
| | | | | | | | * compress.c (bfd_cache_section_contents): New function. * bfd-in2.h: Regenerate. binutils/ * objdump.c (load_specific_debug_section): Use bfd_cache_section_contents.
* ChangeLog bfdKai Tietz2012-10-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-10-18 Kai Tietz <ktietz@redhat.com> PR binutils/14067 * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE. Allow BFD_COMPRESS and BFD_DECOMPRESS flags. * coff-x86_64.c: Likewise. * coffcode.h (DOT_ZDEBUG): New define. (sec_to_styp_flags): Check for .zdebug. (styp_to_sec_flags): Likewise. * coffgen.c (make_a_section): Handle .debug_* section compression/decompression flags. * cofflink.c (mark_relocs): Ignore relocations for a section, which isn't marked as used. (_bfd_coff_link_input_bfd): Add support of compressed debug sections. * compress.c (decompress_contents): Loop as long as there is input available and there is room for output. * bfd/pe-arm.c: Add .zdebug_ partial match entry. * pe-i386.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all data-directories as this might destroy content. * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): define as coff_find_nearest_line_discriminator. * libcoff-in.h (coff_find_nearest_line_discriminator): New * libcoff.h: Regenerated. * coff-x86_64.c: Likewise. * coffgen.c (coff_find_nearest_line_discriminator): New function. prototype. ChangeLog binutils 2012-10-18 Kai Tietz <ktietz@redhat.com> * objdump.c (dump_bfd): Call dump headers after call of slurp_symtab. ChangeLog ld 2012-10-18 Kai Tietz <ktietz@redhat.com> PR binutils/14067 * NEWS: Menition new feature. * scripttempl/pep.sc: Add zdebug sections. * scripttempl/pe.sc: L
* typo fixesAlan Modra2012-08-171-1/+1
|
* 2012-07-24 Teresa Johnson <tejohnson@google.com>Cary Coutant2012-07-241-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * bfd.c (bfd_find_nearest_line_discriminator): New macro. * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator. * coff64-rs6000.c: Likewise. * dwarf2.c (struct line_info): Add discriminator field. (add_line_info): Fill in new discriminator field. (decode_line_info): Record discriminator information instead of ignoring it. (lookup_address_in_line_info_table): Return discriminator field if requested. (comp_unit_find_nearest_line): Add discriminator argument. (find_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Likewise. * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line_discriminator): Likewise. (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper that invokes _bfd_elf_find_nearest_line_discriminator with correct arguments. (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line): Change to a wrapper that invokes _bfd_elf_find_line_discriminator with correct arguments. (_bfd_elf_find_line_discriminator): New. * coffgen.c (coff_find_nearest_line_with_names): Handle new discriminator argument. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator argument. (_bfd_dwarf2_find_line): Likewise. (_bfd_generic_find_nearest_line_discriminator): New. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_nearest_line_discriminator with _bfd_generic_find_nearest_line_discriminator. (bfd_target): Add _bfd_find_nearest_line_discriminator. binutils/ * addr2line.c (find_address_in_section): Invoke bfd_find_nearest_line_discriminator to get the discriminator. (find_offset_in_section): Likewise. (translate_addresses): Print discriminator if it is non-zero. * objdump.c (show_line): Invoke bfd_find_nearest_line_discriminator to get the discriminator, and keep track of prev_discriminator. Print discriminator if it is non-zero. (disassemble_data): Initialize prev_discriminator. (dump_reloc_set): Invoke bfd_find_nearest_line_discriminator to get the discriminator, and keep track of last_discriminator. Print discriminator if it is non-zero.
* Print addend as signed in objdumpH.J. Lu2012-05-141-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binutils/ * objdump.c (disassemble_bytes): Print addend as signed. (dump_reloc_set): Likewise. gas/testsuite/ * gas/all/fwdexp.d: Expect addend as signed. * gas/alpha/elf-reloc-1.d: Likewise. * gas/i386/mixed-mode-reloc64.d: Likewise. * gas/i386/reloc64.d: Likewise. * gas/i386/ilp32/mixed-mode-reloc64.d: Expect addend as signed. * gas/i386/ilp32/reloc64.d: Likewise. * gas/ia64/pcrel.d: Likewise. * gas/mips/branch-misc-2-64.d: Likewise. * gas/mips/branch-misc-2pic-64.d: Likewise. * gas/mips/branch-misc-4-64.d: Likewise. * gas/mips/ldstla-n64-sym32.d: Likewise. * gas/mips/micromips@branch-misc-2-64.d: Likewise. * gas/mips/micromips@branch-misc-2pic-64.d: Likewise. * gas/mips/micromips@branch-misc-4-64.d: Likewise. * gas/mips/mips16-hilo-n32.d: Likewise. * gas/ppc/astest.d: Likewise. * gas/ppc/astest2.d: Likewise. * gas/ppc/astest2_64.d: Likewise. * gas/ppc/astest64.d: Likewise. * gas/ppc/test1elf32.d: Likewise. * gas/ppc/test1elf64.d: Likewise. * gas/sparc/reloc64.d: Likewise.
* * doc/binutils.texi: Add --dwarf-check option.Cary Coutant2012-05-111-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dwarf.c (dwarf_check): New global flag. (fetch_indexed_string): New function. (fetch_indexed_value): New function. (get_FORM_name): Add DW_FORM_GNU_str_index and DW_FORM_GNU_addr_index. (decode_location_expression): Add DW_OP_GNU_addr_index. (read_and_display_attr_value): Add DW_FORM_GNU_str_index, DW_FORM_GNU_addr_index, DW_AT_GNU_addr_base, and DW_AT_GNU_ranges_base. (get_AT_name): Add new attributes for Fission. (process_debug_info): Load new debug sections for Fission. (load_debug_info): Check for .debug_info.dwo section. (display_loc_list, display_loc_list_dwo): New functions. (display_debug_loc): Move logic to above two functions. (display_debug_info): Choose abbrev section based on info section. (display_debug_types): Likewise. (display_trace_info): Likewise. (comp_addr_base): New function. (display_debug_addr): New function. (display_debug_str_offsets): New function. (display_debug_ranges): Allow missing range lists. Suppress diagnostics if dwarf_check not set. (debug_displays): Add column to select abbrev section. * dwarf.h (enum dwarf_section_display_enum): Add new debug sections for Fission. (struct dwarf_section): Add abbrev_sec field. (struct dwarf_section_display): New type. (debug_info): Add addr_base, ranges_base fields. (dwarf_check): New global variable. * objdump.c (usage): Add --dwarf-check option. (enum option_values): Add OPTION_DWARF_CHECK. (long_options): Add --dwarf-check. (main): Likewise. * readelf.c (OPTION_DWARF_CHECK): New macro. (options): Add --dwarf-check. (parse_args): Likewise. (process_section_headers): Use const_strneq instead of streq.
* * objdump.c (dump_bfd): If defaulting to dwarf callNick Clifton2012-04-111-0/+1
| | | | dwarf_select_sections_all to enable displays.
* * objdump.c (slurp_file): Close file if fstat fails.Alan Modra2012-02-201-8/+11
|
* * sysdep.h: Include sys/stat.h here.Alan Modra2012-02-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | * ar.c: Don't include headers already included by sysdep.h. * bucomm.c: Likewise. * budbg.h: Likewise. * dlltool.h: Likewise. * elfedit.c: Likewise. * nlmconv.c: Likewise. * objcopy.c: Likewise. * objdump.c: Likewise. * objdump.h: Likewise. * readelf.c: Likewise. * rename.c: Likewise. * resrc.c: Likewise. * strings.c: Likewise. * windres.c: Likewise. * od-macho.c: Ensure #include sysdep.h is first. * od-xcoff.c: Likewise. * dllwrap.c: Remove alloca pragma handled by sysdep.h, and remove duplicate headers. * dlltool.c: Likewise and ensure #include sysdep.h is first.
* 2012-01-10 Tristan Gingold <gingold@adacore.com>Tristan Gingold2012-01-101-21/+31
| | | | | | | * objdump.c (display_object_bfd): Renamed from ... (display_bfd): ... this. (display_any_bfd): New function. (display_file): Split. Handle nested archives.
* 2011-05-16 Tristan Gingold <gingold@adacore.com>Tristan Gingold2011-05-161-1/+79
| | | | | | | | | | | | | | | | | | | | | | | | | * od-xcoff.c: New file. * objdump.h: New file. * objdump.c: Include objdump.h (dump_private_options, objdump_private_vectors): New variables. (usage): Mention -P/--private. Display handled options. (long_options): Add -P/--private. (dump_target_specific): New function. (dump_bfd): Handle dump_private_options. (main): Handle -P. * doc/binutils.texi (objdump): Document -P/--private. * configure.in (OBJDUMP_PRIVATE_VECTORS, OBJDUMP_PRIVATE_OFILES): New variables, compute them. (od_vectors): Add vectors for private dumpers. Make them uniq. (OBJDUMP_DEFS): Add OBJDUMP_PRIVATE_VECTORS. * Makefile.am (HFILES): Add objdump.h (CFILES): Add od-xcoff.c (OBJDUMP_PRIVATE_OFILES): New variable. (objdump_DEPENDENCIES): Append OBJDUMP_PRIVATE_OFILES. (objdump_LDADD): Ditto. (EXTRA_objdump_SOURCES): Define. * Makefile.in: Regenerate. * configure: Regenerate.
* * NEWS: Add note about --dwarf-depth, --dwarf-start, andTom Tromey2011-04-281-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | dwarf-mode.el. * objdump.c (suppress_bfd_header): New global. (usage): Update. (OPTION_DWARF_DEPTH, OPTION_DWARF_START): New constants. (options): Add dwarf-depth and dwarf-start entries. (dump_bfd): Use suppress_bfd_header. (main): Handle OPTION_DWARF_START, OPTION_DWARF_DEPTH. * doc/binutils.texi (objcopy): Document --dwarf-depth and --dwarf-start. (readelf): Likewise. * dwarf-mode.el: New file. * dwarf.c (dwarf_cutoff_level, dwarf_start_die): New globals. (read_and_display_attr_value): Also check debug_info_p. (process_debug_info): Handle dwarf_start_die and dwarf_cutoff_level. * dwarf.h (dwarf_cutoff_level, dwarf_start_die): Declare. * readelf.c (usage): Update. (OPTION_DWARF_DEPTH): New macro. (OPTION_DWARF_START): Likewise. (options): Add dwarf-depth and dwarf-start entries. (parse_args): Handle OPTION_DWARF_START and OPTION_DWARF_DEPTH. testsuite * binutils-all/objdump.W: Correct output.
* binutils/David S. Miller2011-04-041-1/+37
| | | | | * objdump.c (dump_reloc_set): Output R_SPARC_OLO10 relocations accurately, rather than how they are represented internally.
* * objdump.c (dump_reloc_set): Free malloced memory.Nick Clifton2011-03-251-1/+6
|
* objdump: fix typo in help messageMike Frysinger2011-03-031-1/+1
|
* ChangeLog binutils/Kai Tietz2011-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2011-02-28 Kai Tietz <kai.tietz@onevision.com> * debug.c (debug_start_source): Use filename_(n)cmp. * ieee.c (ieee_finish_compilation_unit): Likewise. (ieee_lineno): Likewise. * nlmconv.c (main): Likewise. * objcopy.c (strip_main): Likewise. (copy_main): Likewise. * objdump.c (show_line): Likewise. (dump_reloc_set): Likewise. * srconv.c (main): Likewise. * wrstabs.c (stab_lineno): Likewise. ChangeLog gas/ 2011-02-28 Kai Tietz <kai.tietz@onevision.com> * depend.c (register_dependency): Use filename_(n)cmp. * dwarf2dbg.c (get_filenum): Likewise. * ecoff.c (add_file): Likewise. (ecoff_generate_asm_lineno): Likewise. * input-scrub.c (new_logical_line_flags): Likewise. * listing.c (file_info): Likewise. (listing_newline): Likewise. * remap.c (remap_debug_filename): Likewise. * stabs.c (generate_asm_file): Likewise. (stabs_generate_asm_lineno): Likewise.
* * dwarf.c: #include "bfd_stdint.h".Doug Evans2010-12-031-1/+1
| | | | | | | | | | | | | | (do_gdb_index): New global. (display_gdb_index): New function. (dwarf_select_sections_by_names) Add "gdb_index". (dwarf_select_sections_all): Set do_gdb_index. (debug_displays): Add .gdb_index. * dwarf.h (do_gdb_index): Declare. * objdump.c (usage): Add gdb_index. * readelf.c (usage): Add gdb_index. (process_section_headers): Process ".gdb_index". * doc/binutils.texi (readelf): Document gdb_index dump. (objdump): Ditto.
* Add and use elfcomm.c/elfcomm.h.H.J. Lu2010-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2010-11-21 H.J. Lu <hongjiu.lu@intel.com> PR binutils/12235 * elfcomm.c: New. * elfcomm.h: Likewise. * Makefile.am (HFILES): Add elfcomm.h. (CFILES): Add elfcomm.c. (ELFLIBS): New. (readelf_SOURCES): Add $(ELFLIBS). (elfedit_SOURCES): Likewise. (objdump_SOURCES): Likewise. * Makefile.in: Regenerated. * dwarf.c: Include "elfcomm.h". (byte_get): Removed. (byte_get_little_endian): Likewise. (byte_get_big_endian): Likewise. (byte_get_signed): Likewise. (error): Likewise. (warn): Likewise. * dwarf.h (dwarf_vma): Defined with HOST_WIDEST_INT. (dwarf_size_type): Likewise. (byte_get): Removed. (byte_get_signed): Likewise. (byte_get_little_endian): Likewise. (byte_get_big_endian): Likewise. (error): Likewise. (warn): Likewise. * elfedit.c: Include "elfcomm.h". Don't include "aout/ar.h". Call error () instead of non_fatal (). (streq): Removed. (strneq): Likewise. (const_strneq): Likewise. (non_fatal): Likewise. (BYTE_GET): Likewise. (BYTE_PUT): Likewise. (byte_get): Likewise. (byte_put): Likewise. (byte_get_little_endian): Likewise. (byte_get_big_endian): Likewise. (byte_put_little_endian): Likewise. (byte_put_big_endian): Likewise. (adjust_relative_path): Likewise. (archive_info): Likewise. (setup_archive): Likewise. (release_archive): Likewise. (setup_nested_archive): Likewise. (get_archive_member_name): Likewise. (get_archive_member_name_at): Likewise. (make_qualified_name): Likewise. * objdump.c: Include "elfcomm.h". * readelf.c: Include "elfcomm.h". Don't include "aout/ar.h". (BYTE_GET): Removed. (BYTE_GET_SIGNED): Removed. (streq): Likewise. (strneq): Likewise. (const_strneq): Likewise. (byte_put): Likewise. (byte_put_little_endian): Likewise. (byte_put_big_endian): Likewise. (adjust_relative_path): Likewise. (archive_info): Likewise. (setup_archive): Likewise. (release_archive): Likewise. (setup_nested_archive): Likewise. (get_archive_member_name): Likewise. (get_archive_member_name_at): Likewise. (make_qualified_name): Likewise.
* * ar.c (print_contents): Don't internationalize strings without words.Alan Modra2010-11-171-2/+0
| | | | | | | | | | | | | | | * dwarf.c (process_extended_line_op): Likewise. (process_debug_info): Likwise. (display_debug_lines_raw): Likewise. (display_debug_lines_decoded): Likewise. (display_debug_abbrev): Likewise. * readelf.c (process_file_header): Likewise. (GET_OP): Likewise. (decode_arm_unwind): Likewise. (process_mips_specific): Likewise. * resrc.c (run_cmd): Likewise. (rcparse_warning): Likewise. * objdump.c (dump_headers): Don't print "Pg".
* Don't display bits only used for BFD in abfd->flags.H.J. Lu2010-11-031-1/+1
| | | | | | | | | | | | | | | | bfd/ 2010-11-02 H.J. Lu <hongjiu.lu@intel.com> * bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New. * bfd-in2.h: Regenerated. binutils/ 2010-11-02 H.J. Lu <hongjiu.lu@intel.com> * objdump.c (dump_bfd_header): Don't display BFD_FLAGS_FOR_BFD_USE_MASK bits in abfd->flags.
* Add compressed debug section support to binutils and ld.H.J. Lu2010-10-291-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> Cary Coutant <ccoutant@google.com> * archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS and BFD_DECOMPRESS. * bfd.c (BFD_COMPRESS): New. (BFD_DECOMPRESS): Likewise. (BFD_FLAGS_SAVED): Likewise. (bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED. * compress.c (bfd_uncompress_section_contents): Removed. (get_uncompressed_size): New. (decompress_contents): Likewise. (bfd_compress_section_contents): Likewise. (bfd_get_full_section_contents): Likewise. (bfd_is_section_compressed): Likewise. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. * dwarf2.c (dwarf_debug_sections): New. (dwarf_debug_section_enum): Likewise. (read_section): Remove section_name and compressed_section_name. Add dwarf_debug_section_enum. Try compressed debug section. (read_indirect_string): Updated. (read_abbrevs): Likewise. (decode_line_info): Likewise. (read_debug_ranges): Likewise. (find_line): Updated. * ecoff.c (bfd_debug_section): Add compress_status and compressed_size. * elf.c (_bfd_elf_make_section_from_shdr): Call bfd_is_section_compressed to check if a DWARF debug section is compressed. Call bfd_init_section_compress_status or bfd_init_section_decompress_status if needed. * elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents with bfd_get_full_section_contents. * merge.c (_bfd_add_merge_section): Likewise. * reloc.c (bfd_generic_get_relocated_section_contents): Likewise. * simple.c (bfd_simple_get_relocated_section_contents): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and BFD_DECOMPRESS. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (dwarf_debug_section): New. (dwarf_debug_sections): Likewise. * libbfd.c (_bfd_generic_get_section_contents): Issue an error when getting contents on compressed/decompressed section. * section.c (COMPRESS_SECTION_NONE): New. (COMPRESS_SECTION_DONE): Likewise. (DECOMPRESS_SECTION_SIZED): Likewise. (BFD_FAKE_SECTION): Add compress_status and compressed_size. (bfd_malloc_and_get_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. binutils/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * addr2line.c (process_file): Set BFD_DECOMPRESS. * objcopy.c (do_debug_sections): New. (OPTION_COMPRESS_DEBUG_SECTIONS): New. (OPTION_DECOMPRESS_DEBUG_SECTIONS): Likewise. (copy_options): Add OPTION_COMPRESS_DEBUG_SECTIONS and OPTION_DECOMPRESS_DEBUG_SECTIONS. (copy_usage): Add --compress-debug-sections and --decompress-debug-sections. (copy_file): Set BFD_COMPRESS or BFD_DECOMPRESS. (copy_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. (copy_main): Handle OPTION_COMPRESS_DEBUG_SECTIONS and OPTION_DECOMPRESS_DEBUG_SECTIONS. Check do_debug_sections to rename DWARF debug sections. * objdump.c (load_specific_debug_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. Remove bfd_uncompress_section_contents. (dump_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. (display_file): Set BFD_DECOMPRESS if needed. * readelf.c (uncompress_section_contents): Set buffer to NULL to indiate decompression failure. (load_specific_debug_section): Always call uncompress_section_contents. * doc/binutils.texi: Document --compress-debug-sections and --decompress-debug-sections. binutils/testsuite/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * binutils-all/compress.exp: New. * binutils-all/dw2-1.S: Likewise. * binutils-all/dw2-2.S: Likewise. * binutils-all/libdw2-compressed.out: Likewise. * binutils-all/libdw2.out: Likewise. gas/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * write.c (compress_debug): Optimize section flags check. gas/testsuite/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * elf/dwarf2-1.s: Replace .zdebug_abbrev section with .debug_abbrev section. * elf/dwarf2-2.3: Likewise. * elf/dwarf2-1.d: Pass --compress-debug-sections to assembler. Updated. * elf/dwarf2-2.d: Likewise. * gas/i386/i386.exp: Remove xfail on dw2-compress-2 and x86-64-dw2-compress-2. ld/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * ldfile.c (ldfile_try_open_bfd): Set BFD_DECOMPRESS after bfd_openr returns. * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Likewise. * scripttempl/elf.sc: Include compressed DWARF debug sections. ld/testsuite/ 2010-10-29 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/compress.exp: New. * ld-elf/compress1.s: Likewise. * ld-elf/compress1a.d: Likewise. * ld-elf/compress1b.d: Likewise. * ld-elf/compress1c.d: Likewise.
* * bucomm.c (bfd_nonfatal): Flush stdout before output to stderr.Alan Modra2010-10-051-10/+16
| | | | | | | | | | | | | | (bfd_nonfatal_message, report, list_matching_formats): Likewise. (list_supported_targets): Tidy. * objdump.c (free_only_list): Formatting. (slurp_dynamic_symtab): Non-zero exit status for "not a dynamic object". (update_source_path): Delete redundant check for NULL filename. (disassemble_bytes): Error if disassemble_fn returns a value that won't increment address. (disassemble_data): Don't capitalize error message. (read_section_stabs): Likewise. (main): Return non-zero exit status on bad options.
* * dwarf.c (init_dwarf_regnames_i386, init_dwarf_regnames_x86_64): New.Richard Henderson2010-09-021-3/+17
| | | | | | | (init_dwarf_regnames): Use them. * dwarf.h: Declare them. * objdump.c (dump_dwarf): Use bfd_get_arch + bfd_get_mach to set up the regnames, rather than using elf_machine_code.
* * objdump.c (dump_dwarf): Use bfd_arch_bits_per_address.Richard Henderson2010-09-021-3/+1
|
* bfd/ChangeLog:Cary Coutant2010-07-031-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED. * dwarf2.c (read_and_uncompress_section): New function. (read_section): Call it. (find_line): Likewise. binutils/ChangeLog: * objdump.c (load_specific_debug_section): Decompress section contents before applying relocations. * readelf.c (load_specific_debug_section): Update section size after decompression. gas/ChangeLog: * Makefile.am: Add compress-debug.c and compress-debug.h. * Makefile.in: Regenerate. * config.in: Add HAVE_ZLIB_H. * configure.in: Check for zlib.h. * configure: Regenerate. * as.c (parse_args): Add --compress-debug-sections and --nocompress-debug-sections. * as.h (flag_compress_debug): New variable. * compress-debug.c: New file. * compress-debug.h: New file. * write.c: Include compress-debug.h. (compress_frag): New function. (compress_debug): New function. (write_object_file): Compress debug sections if requested.
* 2010-05-24 Tristan Gingold <gingold@adacore.com>Tristan Gingold2010-05-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | * readelf.c (usage): Add new trace sections for --debug-dump. (process_section_headers): Handle dump of trace sections. * objdump.c (usage): Add new trace sections for --dwarf. * dwarf.h (do_trace_info, do_trace_abbrevs): New variables. (do_trace_aranges): Ditto. (enum dwarf_section_display_enum): Add trace_info, trace_abbrev and trace_aranges literals. * dwarf.c (do_trace_info, do_trace_abbrevs): New variables. (do_trace_aranges): Ditto. (process_debug_info): Add abbrev_sec argument and replace abbrev with abbrev_sec. (load_debug_info): Adjust call of process_debug_info. (display_debug_info): Ditto. (display_trace_info): New function. (dwarf_select_sections_by_names): Add trace_info, trace_abbrevs and trace_aranges sections name. (dwarf_select_sections_all): Also select trace sections. (debug_displays): Reindent. Add entries for the trace sections. * doc/binutils.texi (readelf): Document new --dwarf parameters. (objdump): Ditto.
* bfd/ChangeLogNick Clifton2010-04-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2010-04-09 Nick Clifton <nickc@redhat.com> * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count. * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused variables htab and hdr_info and mark info parameter as unused. * elf.c (prep_headers): Remove unused variable i_phdrp. (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp. * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned as unused. * peXXigen.c (pe_print_reloc): Remove unused variable datasize. * verilog.c (verilog_write_section): Remove unused variable address. binutils/ChangeLog 2010-04-09 Nick Clifton <nickc@redhat.com> * dwarf.c (process_debug_info): Remove unused variable cu_abbrev_offset_ptr. (display_debug_lines_decoded): Remove unused variable prev_line. * elfedit.c (process_archive): Remove unused variable file_name_size. * ieee.c (ieee_start_compilation_unit): Remove unused variable nindx. (ieee_set_type): Remove unused variables info, targetindx and baseindx. * objdump.c (disassmble_byte): Remove unused variable done_dot. * rddbg.c (read_section_stabs_debugging_info): Remove unused variable other. * readelf.c (dump_section_as_strings): Remove unused variable addr. (process_archive): Remove unused variable file_name_size. * stabs.c (parse_stab_string): Mark desc parameter as unused. Remove unused variable lineno. (parse_stab_struct_type): Remove unused variable orig. (stab_demangle_type): Remove unused variables constp, volatilep and hold. gas/ChangeLog 2010-04-09 Nick Clifton <nickc@redhat.com> * as.c (create_obj_attrs_section): Remove unused variable addr. * listing.c (listing_listing): Remove unused variable message. * read.c: Remove unnecessary register type qualifiers. (s_mri): Only define/use old_flag variable if MRI_MODE_CHANGE is defined. ld/ChangeLog 2010-04-09 Nick Clifton <nickc@redhat.com> * ldlang.c (wild_sort): Remove unused variable section_name. opcodes/ChangeLog 2010-04-09 Nick Clifton <nickc@redhat.com> * i386-dis.c (print_insn): Remove unused variable op. (OP_sI): Remove unused variable mask.
* * objdump.c (disassemble_bytes): Clear aux->reloc before printingNick Clifton2010-02-081-2/+3
| | | | | | | | a new address, so as not to reuse a previous, non-related reloc. * gas/arm/arm-it-auto.d, gas/arm/bl-local-v4t.d, gas/arm/blx-local.d, gas/arm/thumb-w-good.d: Update expected results.
* PR 11225Nick Clifton2010-01-281-20/+81
| | | | | | | | | | | | | | * objdump.c (only): Replace with linked list. (only_size, only_used): Replace with only_list. (process_section_p): Set seen field on matches sections. (add_only): New function. (free_only_list): New function. (disassemble_section): Check only_list. (main): Use add_only and free_only_list. * gas/pe/aligncomm-c.d: Dump all sections. * ld-sh/refdbg-0-dso.d: Dump all sections.
* 2010-01-13 Tristan Gingold <gingold@adacore.com>Tristan Gingold2010-01-131-15/+1
| | | | | | * ar.c (main): Use lbasename. (normalize): Ditto. * objdump.c (update_source_path): Ditto.
* Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton2009-12-111-112/+112
| | | | Fix up all warnings generated by the addition of this switch.
* PR binutils/11045Nick Clifton2009-12-031-2/+2
| | | | | | | | | | | | | | * dwarf.c (do_debug_pubtypes): New variable. (dwarf_select_sections_by_names): Handle .debug_pubtypes. (dwarf_select_sections_by_letters): Add 't' for .debug_pubtype. (dwarf_select_sections_all): Set do_debug_pubtypes. (debug_displays): Add support for .debug_pubtypes. * dwarf.h (do_debug_pubtypes): Export. * objdump.c (usage): Add -wt or --dwarf=pubtypes. * readelf.c (usage): Likewise. (process_section_headers): Enable debug display if do_debug_pubtypes is set. * doc/binutils.texi: Document -wt/--dwarf=pubtypes option.
* * readelf.c (usage): Add mention of --debug-dump=frames-interp.Nick Clifton2009-10-161-1/+2
| | | | | | Wrap output to 80 columns. * objdump.c (usage): Likewise. * doc/binutils.texi (readelf): Add note about =frames-interp.
* binutils/Richard Sandiford2009-09-221-4/+4
| | | | | * objdump.c (disassemble_section): Use bfd_get_arch_size instead of assuming that the address size is 32 bits.
* Updated soruces in binutils/* to compile cleanly with -Wc++-compat.Nick Clifton2009-09-101-27/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * binutils/addr2line.c (slurp_symtab): Fix casts. Introduce variable minisyms to avoid aliasing varning. * binutils/ar.c: Add casts. (normalize): Use name del instead of delete. (display_target_list,display_info_table): Change loop counter variable a to int. * binutils/bucomm.c: Add casts. * binutils/debug.c: Update function to use new names. (struct debug_baseclass): Rename member from virtual to is_virtual. (struct debug_type_s,struct debug_field_s,struct debug_baseclass_s,struct debug_method_s,struct debug_method_variant_s,struct debug_type_s): Rename struct from avoid name collision. * /binutils/debug.h: Use new struct names. * binutils/dwarf.c: Add casts. (free_debug_memory): Change loop counter variable a to int. * binutils/ieee.c: Add casts. (enum ieee_var_kind): Move to top level. (ieee_class_baseclass): Rename parameter virtual to is_virtual. (ieee_class_method_var): Rename variable virtual to is_virtual. * binutils/nm.c: Add casts. * binutils/objcopy.c: Add casts. (copy_archive): Rename variable delete to del. * binutils/objdump.c: Add casts. (dump_dwarf_section): Change loop counter variable i to int. * binutils/prdbg.c: Add casts. (pr_class_baseclass,tg_class_baseclass): Rename parameters virtual to is_virtual. * binutils/readelf.c: Add casts. (struct ia64_unw_table_entry,struct hppa_unw_table_entry): Move to top level. * binutils/size.c: Add casts. * binutils/stabs.c (parse_stab_type, parse_stab_range_type) (parse_stab_cpp_abbrev): Rename parameter from typename to type_name. (parse_stab_baseclasses): Rename variable virtual to is_virtual. * binutils/strings.c: Add casts. * binutils/wrstabs.c (stab_class_baseclass): Rename parameter virtual to is_virtual.
* * objdump.c (find_symbol_for_address): Avoid costly call toCary Coutant2009-08-241-1/+1
| | | | bfd_octets_per_byte.
* PR 10413Nick Clifton2009-07-271-18/+21
| | | | | * objdump.c (dump_section_header): Skip sections that we are ignoring.
* 2009-07-20 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-07-201-2/+13
| | | | | | | | | | | | | * NEWS: Mention --insn-width. * objdump.c (insn_width): New. (usage): Display --insn-width. (option_values): Add OPTION_INSN_WIDTH. (long_options): Add --insn-width. (disassemble_bytes): Handle insn_width. (main): Handle OPTION_INSN_WIDTH. * doc/binutils.texi: Document --insn-width.
* 2009-07-06 Tristan Gingold <gingold@adacore.com>Tristan Gingold2009-07-061-14/+11
| | | | | | | * objdump.c (dump_dwarf_section): Handle .eh_frame like other dwarf sections. * dwarf.h (struct dwarf_section_display): Remove eh_frame field. * dwarf.c (debug_displays): Adjust for removed field.
* PR 10288Nick Clifton2009-06-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | * arm-dis.c (print_insn_coprocessor): Check that a user specified ARM architecture supports the matched instruction. (print_insn_arm): Likewise. (select_arm_features): New function. Fills in the fields of an arm_feature_set structure based on a given arm machine number. (print_insn): Initialise an arm_feature_set structure. * objdump.c (disassemble_bytes): Set the USER_SPECIFIED_MACHINE_TYPE flag in the disassemble_info structure if the user has invoked the -m switch. * doc/binutils.texi: Document the additional behaviour of objdump's -m switch for ARM targets. * dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags field of struct disassemble_info. * gas/arm/align.s: Add labels so that COFF based targets can correctly locate THUMB code. * gas/arm/copro.d: Do not pass --architecture switch to objdump.
* PR 10263Nick Clifton2009-06-151-2/+2
| | | | | | | | | | | | * arm-dis.c (print_insn): Ignore is_data if the user has requested the disassembly of data as well as instructions. * objdump.c (disassemble_bytes): Set the DISASSEMBLE_DATA bit in the flags field of the disassemble_info structure if the -D switch is in operation. * dis-asm.h (struct disassemble_info): New value for the flags field.
* * objdump.c (disassemble_section): If the computed next offset isNick Clifton2009-03-051-2/+3
| | | | not beyond the current offset then just continue to the end.
* * objdump.c (disassemble_section): Mask address before sign extending.Alan Modra2009-03-031-1/+1
|
* * objdump.c (load_specific_debug_section): New function, fromCary Coutant2009-02-231-17/+36
| | | | | | load_debug_section. (load_debug_section): Use load_specific_debug_section. (dump_dwarf_section): Likewise.
* 2009-02-09 Tristan Gingold <gingold@adacore.com>Tristan Gingold2009-02-091-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Mention feature match between objdump and readelf for dumping dwarf info. * doc/binutils.texi (objdump): Document -W/--dwarf improvments to objdump. * objdump.c (usage): Update documentation for -W/--dwarf. (enum option_values): Add OPTION_DWARF. (long_options): --dwarf can accept arguments. (dump_dwarf_section): Also check enabled field. (main): Option -W can accept arguments, code moved to dwarf.c and call dwarf_select_sections_all instead. * readelf.c (process_section_headers): Remove do_debug_lines_decoded. (parse_args): Move code to... * dwarf.c (dwarf_select_sections_by_letters, dwarf_select_sections_by_names): : ...here (new functions). (do_debug_lines_decoded): Remove and replaced by ... (FLAG_DEBUG_LINES_RAW, FLAG_DEBUG_LINES_DECODED): ... new macros. (display_debug_lines): Adjust for previous change. (dwarf_select_sections_all): New function. (debug_displays): Add initializer for enabled field. * dwarf.h (do_debug_lines_decoded): Remove. Add prototypes for the new functions. (struct dwarf_section_display): Add enabled field.