aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
AgeCommit message (Collapse)AuthorFilesLines
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-11-19PR22443, Global buffer overflow in _bfd_elf_get_symbol_version_stringAlan Modra1-7/+10
Symbols like *ABS* defined in bfd/section.c:global_syms are not elf_symbol_type. They can appear on relocs and perhaps other places in an ELF bfd, so a number of places in nm.c and objdump.c are wrong to cast an asymbol based on the bfd being ELF. I think we lose nothing by excluding all section symbols, not just the global_syms. PR 22443 * nm.c (sort_symbols_by_size): Don't attempt to access section symbol internal_elf_sym. (print_symbol): Likewise. Don't call bfd_get_symbol_version_string for section symbols. * objdump.c (compare_symbols): Don't attempt to access section symbol internal_elf_sym. (objdump_print_symname): Don't call bfd_get_symbol_version_string for section symbols.
2017-10-25Allow for __gnu_lto_slim prefixed with extra "_"Alan Modra1-1/+3
Some targets prefix global symbols with "_". bfd/ * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim" optionally prefixed with "_". * linker.c (_bfd_generic_link_add_one_symbol): Likewise. binutils/ * nm.c (filter_symbols): Match "__gnu_lto_slim" optionally prefixed with "_". gold/ * symtab.cc (Symbol_table::add_from_relobj): Match "__gnu_lto_slim" optionally prefixed with "_". ld/ * testsuite/ld-plugin/lto-3r.d: Match "__gnu_lto_v" optionally prefixed with "_". * testsuite/ld-plugin/lto-5r.d: Likewise.
2017-09-25Free memory returned from bfd_get_synthetic_symtabH.J. Lu1-1/+3
PR binutils/22203 * nm.c (display_rel_file): Free memory returned from bfd_get_synthetic_symtab.
2017-07-19Remove datasize measurements based on sbrk()Tristan Gingold1-11/+0
binutils/ * nm.c (show_stats): Remove variable. (long_options): Remove --stats option. (main): Remove handling of --stats. ld/ * ldmain.c (main): Remove display of data size. gas/ * as.c (start_sbrk): Remove. (main): Remove assignment. (dump_statistics): Remove display of data size.
2017-02-13Fix illegal memory access bug in nm when run on a corrupt binary.Nick Clifton1-1/+2
PR binutils/21150 * nm.c (file_symbol): Add test of string length before testing string characters.
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-12-01Fix calculation of synthetic symbol sizes (ppc64)Luis Machado1-2/+5
The attached patch fixes a problem where nm displays bogus information for synthetic symbol sizes when --size-sort is used. This happens because the synthetic symbols (dot symbols for ppc64) are generated based on their non-dot symbols. The generation process doesn't copy over the ELF-specific bits of the regular non-dot symbols. When --size-sort is used, the code attempts to access the symbol size from the ELF-specific bits and ends up reading gargabe, causing the size to be displayed incorrectly. With the patch, i can see dot and non-dot symbols having the same size with --size-sort. This doesn't fix the fact that we don't display size information for synthetic symbols without --size-sort, which i may address in the future. binutils/ChangeLog: 2016-12-01 Luis Machado <lgustavo@codesourcery.com> * nm.c (sort_symbols_by_size): Don't read symbol size if symbol is synthetic.
2016-11-11Add the ability for nm to display symbol version information.Nick Clifton1-0/+18
PR binutils/20751 * nm.c (with_symbol_versions): New local variable. (long_options): Add --with-symbol-versions. (usage): Mention --with-symbol-versions. (print_symbol): If with_symbol_versions is set then display the version information associated with the symbol. * NEWS: Mention the new feature. * doc/binutils.texi (nm): Document the new option. (objdump): Describe how symbol version information is displayed for dynamic symbol dumps. (readelf): Describe how symbol version information is displayed. * testsuite/binutils-all/nm.exp: Add a test of the new feature.
2016-10-06-Wimplicit-fallthrough noreturn fixesAlan Modra1-1/+1
binutils/ * cxxfilt.c (usage): Add ATTRIBUTE_NORETURN. * elfedit.c (usage): Likewise. * nm.c (usage): Likewise. * objcopy.c (copy_usage, strip_usage): Likewise. * srconv.c (show_usage): Likewise. * strings.c (usage): Likewise. * sysdump.c (show_usage): Likewise. * srconv.c: Remove unneeded forward function declarations. * strings.c: Likewise. * sysdump.c: Likewise. gas/ * as.h (as_assert): Add ATTRIBUTE_NORETURN.
2016-09-26Fix nm potential buffer overflowAlan Modra1-14/+22
get_coff_symbol_type had a potenial buffer overflow even with untranslated messages. * nm.c (get_elf_symbol_type): Don't use sprintf with translated strings, use asprintf instead. (get_coff_symbol_type): Likewise.
2016-09-19nm handling of synthetic symbolsAlan Modra1-17/+8
Symbol sorting means we can't assume that the last n symbols are synthetic. * nm.c (print_symbol): Remove is_synthetic param. Test sym->flags instead. (print_size_symbols, print_symbols): Adjust to suit, deleting now unused synth_count param and fromsynth var. (display_rel_file): Adjust, localizing synth_count.
2016-07-16Don't include libbfd.h outside of bfd, part 6Alan Modra1-0/+1
Some messing with plugin code in order to not need arelt_size in ld code. File descriptor handling in ld/plugin.c is tidied too, simply duping the open fd rather than opening the file again. bfd/ * elflink.c: Include plugin-api.h. * plugin.c (bfd_plugin_open_input): New function, extracted from.. (try_claim): ..here. * plugin.h: Don't include bfd.h. (bfd_plugin_open_input): Declare. binutils/ * ar.c: Include plugin-api.h. * nm.c: Likewise. ld/ * plugin.c: Don't include libbfd.h. Include plugin-api.h before bfd/plugin.h. (plugin_object_p): Use bfd_plugin_open_input.
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-12-14nm: basic COFF symbol type support for SysV-style symbol table dumpingJan Beulich1-4/+52
2015-08-12Remove trailing spaces in binutilsH.J. Lu1-2/+2
2015-01-21Fix memory access violations triggered by running strip on fuzzed binaries.Nick Clifton1-0/+1
PR binutils/17512 * coffcode.h (coff_set_arch_mach_hook): Check return value from bfd_malloc. (coff_slurp_line_table): Return FALSE if the line number information was corrupt. (coff_slurp_symbol_table): Return FALSE if the symbol information was corrupt. * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always initialise the fields of the dyld_info structure. (bfd_mach_o_build_exec_seg_command): Replace assertion with an error message and a return value. (bfd_mach_o_layout_commands): Change the function to boolean. Return FALSE if the function fails. (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands fails. (bfd_mach_o_read_command): Fail if an unrecognised command is encountered. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the read fails. (slurp_symtab): Check the return from bfd_malloc. (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy encountered an error. (_bfd_XXi_final_link_postscript): Fail if a section could not be copied. * peicode.h (pe_bfd_object_p): Fail if the header could not be swapped in. * tekhex.c (first_phase): Fail if the section is too big. * versados.c (struct esdid): Add content_size field. (process_otr): Use and check the new field. (versados_get_section_contents): Check that the section exists and that the requested data is available. PR binutils/17512 * addr2line.c (main): Call bfd_set_error_program_name. * ar.c (main): Likewise. * coffdump.c (main): Likewise. * cxxfilt.c (main): Likewise. * dlltool.c (main): Likewise. * nlmconv.c (main): Likewise. * nm.c (main): Likewise. * objdump.c (main): Likewise. * size.c (main): Likewise. * srconv.c (main): Likewise. * strings.c (main): Likewise. * sysdump.c (main): Likewise. * windmc.c (main): Likewise. * windres.c (main): Likewise. * objcopy.c (main): Likewise. (copy_relocations_in_section): Check for relocs without associated symbol pointers.
2015-01-05More fixes for invalid memory accesses triggered by fuzzed binaries.Nick Clifton1-21/+50
PR binutils/17512 * nm.c (print_symbol): Add 'is_synthetic' parameter. Use it to help initialize the info.elfinfo field. (print_size_symbols): Add 'synth_count' parameter. Use it to set the is_synthetic parameter when calling print_symbol. (print_symbols): Likewise. (display_rel_file): Pass synth_count to printing function. (display_archive): Break loop if the last archive displayed matches the current archive. * size.c (display_archive): Likewise. * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized is at least big enough for the header to be read. * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs. * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks. (bfd_mach_o_read_command): Prevetn duplicate error messages about unrecognized commands. * syms.c (_bfd_stab_section_find_nearest_line): Add range checks when indexing into the string table.
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-07-28Warn for ar/nm/ranlib/ld on lto objects without pluginAlan Modra1-0/+4
PR 13227 bfd/ * archive.c (_bfd_compute_and_write_armap): Warn on adding __gnu_lto_slim to armap. * linker.c (_bfd_generic_link_add_one_symbol): Warn on adding __gnu_lto_slim to linker hash table. binutils/ * nm.c (filter_symbols): Warn on __gnu_lto_slim.
2014-04-03This patch allows one to place the gcc's liblto_plugin in the ↵Markus Trippelsdorf1-2/+5
lib/bfd-plugins directory and have it loaded by default (as long as the --target option isn't used). PR binutils/14698 ar.c: Set plugin_target early if plugins are supported. nm.c: Likewise.
2014-03-05Update copyright yearsAlan Modra1-3/+1
2013-10-25 * nm.c (display_rel_file): Treat bfd_error_no_symbols asNick Clifton1-1/+1
non-fatal.
2013-10-25* nm.c (display_rel_file): Treat bfd_error_no_symbols asNick Clifton1-1/+9
non-fatal.
2013-08-19binutils/Tristan Gingold1-8/+1
2013-08-19 Tristan Gingold <gingold@adacore.com> * nm.c (print_size_symbols): Directly get symbol size. binutils/testsuite/ 2013-08-19 Tristan Gingold <gingold@adacore.com> * binutils-all/nm.exp: Add a test for nm --size-sort * binutils-all/nm-elf-1.s: New file. * binutils-all/nm-1.s: New file.
2012-06-29Simplify global symbol handlingH.J. Lu1-4/+4
* nm.c (filter_symbols): Simplify global symbol handling.
2012-01-16 PR binutils/13593Alan Modra1-5/+15
* nm.c (OPTION_SIZE_SORT): Define. (long_options): Don't set no_sort, sort_numerically or sort_by_size directly. (main): Instead set the flags here, making them mutually exclusive.
2011-07-12 PR 12983Cary Coutant1-0/+4
* binutils/nm.c (display_file): Decompress debug sections when printing line numbers.
2011-05-18 PR binutils/12753Nick Clifton1-0/+2
* nm.c (filter_symbols): Treat unique symbols as global symbols. * doc/binutils.texi (nm): Mention that some lowercase letters actually indicate global symbols. * lib/utils-lib.exp (run_dump_test): Allow nm as a program. * binutils-all/nm.exp: Test running "nm -g" on an object file containing a unique symbol.
2011-03-142011-03-07 Michael Snyder <msnyder@vmware.com>Michael Snyder1-0/+1
* nm.c (display_rel_file): Free symsizes.
2010-10-08 * nm.c (value_format_64bit): Define appropriately for __MSVCRT__.Joseph Myers1-0/+8
(set_print_radix): Update for __MSVCRT__ definition of value_format_64bit.
2010-10-03Set BFD target to "plugin" for "nm --plugin".H.J. Lu1-1/+3
2010-10-03 H.J. Lu <hongjiu.lu@intel.com> PR binutils/12088 * nm.c (plugin_target): New. (main): Set plugin_target to "plugin" for --plugin. (display_file): Pass plugin_target to bfd_openr if target isn't set.
2010-01-062010-01-06 Tristan Gingold <gingold@adacore.com>Tristan Gingold1-2/+2
* nm.c (usage): Remove extra blanks. Update copyright.
2009-12-11Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton1-19/+19
Fix up all warnings generated by the addition of this switch.
2009-09-10 Updated soruces in binutils/* to compile cleanly with -Wc++-compat.Nick Clifton1-10/+10
* 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.
2009-09-02update copyright datesAlan Modra1-1/+1
2009-06-19 * ar.c (usage): Do not use #ifdef inside _("...).Nick Clifton1-3/+5
* nm.c (usage): Likewise.
2009-05-282009-05-28 Nick Clifton <nickc@redhat.com>Nick Clifton1-0/+3
* targets.c (_bfd_target_vector): Only include plugin target in all-targets build if BFD_SUPPORTS_PLUGINS is non-zero. 2009-05-27 Rafael Avila de Espindola <espindola@google.com> * plugin.c (program_name): Remove. (plugin_program_name): New. (bfd_plugin_set_program_name): New. (try_load_plugin): Use plugin_program_name. * plugin.h (bfd_plugin_set_program_name): New. 2009-05-27 Rafael Avila de Espindola <espindola@google.com> * ar.c (main): Call bfd_plugin_set_program_name. * nm.c (main): Call bfd_plugin_set_program_name.
2009-05-26 * Makefile.am: Run "make dep-am".Nick Clifton1-3/+17
(AM_CPPFLAGS): New. (LIBDL): New. (ALL_MACHINES): Add cpu-plugin.lo. (ALL_MACHINES_CFILES): Add cpu-plugin.c. (BFD32_BACKENDS): Add plugin.lo. (BFD32_BACKENDS_CFILES): Add plugin.c. (libbfd_la_LIBADD): Add LIBDL * archures.c (bfd_architecture): Add bfd_arch_plugin. (bfd_plugin_arch): Declare. * bfd-in.h (BFD_SUPPORTS_PLUGINS): New. * bfd.c (bfd): Add plugin_data. * config.bfd: Handle the plugin target. * configure.in: Check for --enable-plugins. (LT_INIT): Use the dlopen option. * cpu-plugin.c: New. * plugin.c: New. * plugin.h: New. * targets.c (plugin_vec): Declare. (_bfd_target_vector): Add plugin_vec. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * ar.c: Include plugin.h. (main): Handle the --plugin option. * nm.c: Include plugin.h. (OPTION_PLUGIN): New. (long_options): Add plugin. (main): Handle OPTION_PLUGIN. * NEWS: Mention the new feature. * doc/binutils: Documement the new command line options. * configure.in: Check for --enable-plugins. * configure: Regenerate.
2008-11-13 * nm.c (filter_symbols): Only call memcpy when from != to.Hans-Peter Nilsson1-1/+2
2007-09-13 * nm.c (value_format_64bit, set_print_radix, print_value): HandleAlan Modra1-1/+9
BFD_HOST_64BIT_LONG_LONG. * readelf.c (print_dec_vma): Don't define if BFD_HOST_64BIT_LONG_LONG. (print_vma): Handle BFD_HOST_64BIT_LONG_LONG. (dump_relocations): Likewise. Expand _bfd_int64_low in a number of places.
2007-07-05Change sources over to using GPLv3Nick Clifton1-1/+1
2007-04-26bfd/Alan Modra1-1/+2
Many files: Include sysdep.h before bfd.h. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. binutils/ * bucumm.h: Split off host dependencies to.. * sysdep.h: ..here. Many files: Include sysdep.h. Remove duplicate headers and reorder. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. ld/ Many files: Include sysdep.h first. Remove duplicate headers. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. opcodes/ * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * ns32k-dis.c: Include sysdep.h first.
2007-04-19 * budemang.c: Delete.Alan Modra1-5/+7
* budemang.h: Delete. * addr2line.c (translate_addresses): Call bfd_demangle rather than demangle. * nm.c (print_symname): Likewise. * objdump.c (objdump_print_symname, dump_symbols): Likewise. (dump_bfd): Likewise. * prdbg.c (struct pr_handle <demangler>): Add int param. (tg_variable, tg_start_function): Adjust demangler calls. * Makefile.am: Remove mention of budemang.[ch]. Run "make dep-am". * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate.
2007-04-05 PR binutils/4292Alan Modra1-1/+1
* nm.c (print_value): Cast bfd_vma to unsigned long to suit value_format_32bit.
2007-04-02PR binutils/4292Nick Clifton1-55/+63
* bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit targets as 64-bit values, even if running on a 64-bit host. * coffgen.c (coff_print_symbol): Likewise. * nm.c (value_format): Replace with value_format_32bit and value_format_64bit. (set_radix): Update setting of value_format. (set_print_width): New function. Compute the address size of a given bfd and set the print_width global appropriately. (display_archive): Use set_print_width. (display_file): Likewise, (print_object_filename_sysv): Update use of print_width. (print_archive_member_sysv): Likewise. (print_symbol_filename_posix): Likewise. (print_sumbol_info_bfd, print_symbol_info_sysv): Likewise.
2007-02-17top level:Joseph Myers1-2/+2
2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Fix quoting. * configure: Regenerate. bfd: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-pkgversion): New option. * configure: Regenerate. * Makefile.am (bfdver.h): Substitute for @bfd_version_package@. * Makefile.in: Regenerate. * version.h (BFD_VERSION_STRING): Define using @bfd_version_package@. bfd/doc: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * Makefile.in: Regenerate. binutils: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-bugurl): New option. * configure: Regenerate. * Makefile.am (REPORT_BUGS_TO): Define. (INCLUDES): Define REPORT_BUGS_TO. Regenerate dependencies. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * bucomm.h: Remove include of bin-bugs.h. * addr2line.c (usage): Don't print empty REPORT_BUGS_TO. * ar.c (usage): Pass s to list_supported_targets. Don't print empty REPORT_BUGS_TO. * coffdump.c (show_usage): Don't print empty REPORT_BUGS_TO. * cxxfilt.c (usage): Print bug url when giving help. * dlltool.c (usage): Likewise. * dllwrap.c (usage): Likewise. * nlmconv.c (show_usage): Don't print empty REPORT_BUGS_TO. * nm.c (usage): Likewise. * objcopy.c (copy_usage, strip_usage): Likewise. * objdump.c (usage): Likewise. * readelf.c ((usage): Likewise. Add STREAM argument. Adjust callers. * size.c (usage): Don't print empty REPORT_BUGS_TO. * srconv.c (show_usage): Likewise. * strings.c (usage): Likewise. * sysdymp.c (show_usage): Likewise. * windres.c (usage): Likewise. gas: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-bugurl): New option. * configure: Regenerate. * dep-in.sed: Remove bin-bugs.h. * Makefile.am (REPORT_BUGS_TO): Define. (INCLUDES): Define REPORT_BUGS_TO. (DEP_INCLUDES): Likewise. ($(OBJS)): No longer depend on bin-bugs.h. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * as.c (show_usage): Don't print empty REPORT_BUGS_TO. * as.h: Remove include of bin-bugs.h. gprof: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-pkgversion, --with-bugurl): New options. * configure: Regenerate. * Makefile.am (PKGVERSION, REPORT_BUGS_TO): Define. (INCLUDES): Define PKGVERSION and REPORT_BUGS_TO. Regenerate dependencies. * Makefile.in: Regenerate. * gprof.c (usage): Don't print empty REPORT_BUGS_TO. (main): Include PKGVERSION in version output. * gprof.h: Remove include of bin-bugs.h. include: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * bin-bugs.h: Remove. ld: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-bugurl): New option. * configure: Regenerate. * Makefile.am (REPORT_BUGS_TO): Define. (INCLUDES): Define REPORT_BUGS_TO. Regenerate dependencies. * Makefile.in: Regenerate. * ld.h: Remove include of bin-bugs.h. * lexsup.c (help): Don't print empty REPORT_BUGS_TO.
2005-10-03 * addr2line.c (usage): Document @file.Mark Mitchell1-0/+1
* ar.c (usage): Likewise. * coffdump (usage): Likewise. * cxxfilt.c (usage): Likewise. * dlltool.c (usage): Likewise. * dllwrap.c (usage): Likewise. * nlmconv.c (usage): Likewise. * nm.c (usage): Likewise. * objcopy.c (usage): Likewise. * objdump.c (usage): Likewise. * readelf.c (usage): Likewise. * size.c (usage): Likeise. * srconv.c (usage): Likewise. * strings.c (usage): Likewise. * windres.c (usage): Likewise. * doc/binutils.texi: Add section on common options.
2005-09-30 * addr2line.c (main): Likewise.Mark Mitchell1-0/+2
* ar.c (main): Likewise. * coffdump.c (main): Likewise. * cxxfilt.c (main): Likewise. * dlltool.c (main): Likewise. * dllwrap.c (main): Likewise. * nlmconv.c (main): Likewise. * nm.c (main): Likewise. * objcopy.c (main): Likewise. * objdump.c (main): Likewise. * readelf.c (main): Likewise. * size.c (main): Likeiwse. * srcconv.c (main): Likewise. * strings.c (main): Likewise. * sysdump.c (main): Likewise. * sysinfo.c (main): Likewise. * windres.c (main): Likewise. * ldmain.c (main): Use expandargv. * gprof.c (main): Use expandargv. * as.c (main): Use expandargv.
2005-06-06bfd/H.J. Lu1-3/+4
2005-06-06 H.J. Lu <hongjiu.lu@intel.com> PR 990 * bfd.c (bfd_find_line): New. * dwarf2.c (comp_unit): Add variable_table. (funcinfo): Add file, line, and sec. (varinfo): New. (lookup_symbol_in_function_table): New. (lookup_symbol_in_variable_table): New. (scan_unit_for_functions): Renamed to ... (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and DW_TAG_variable. (comp_unit_find_nearest_line): Updated. (comp_unit_find_line): New. (_bfd_dwarf2_find_line): New. * elf-bfd.h (_bfd_elf_find_line): New. (_bfd_generic_find_line): New. Defined. * elf.c (_bfd_elf_find_line): New. * libbfd-in.h (_bfd_dwarf2_find_line): New. (_bfd_generic_find_line): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * libbfd.c (_bfd_generic_find_line): New. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line with _bfd_generic_find_line. (bfd_target): Add _bfd_find_line. binutils/ 2005-06-06 H.J. Lu <hongjiu.lu@intel.com> PR 990 * nm.c (print_symbol): Call bfd_find_line before bfd_find_nearest_line.