summaryrefslogtreecommitdiff
path: root/binutils/strings.c
Commit message (Collapse)AuthorAgeFilesLines
* * strings.c (get_char): Dispense with buf[]. Instead shiftAlan Modra2013-03-061-19/+6
| | | | | chars into big-endian value and byte-swap later if little-endian. Don't EOF check value read from object.
* * sysdep.h: Include sys/stat.h here.Alan Modra2012-02-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | * 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.
* * strings.c (print_strings): Plug memory leak.Nick Clifton2011-03-251-2/+6
|
* binutils/Jan Kratochvil2009-11-111-24/+11
| | | | | | | | | | | | * configure.in: Stop checking for fopen64 and stat64. * strings.c (file_off, file_open, statbuf, file_stat): Remove. (strings_file): Change file_off to file_ptr, file_open to fopen, statbuf to struct stat and file_stat to stat. (get_char): Change parameter type file_off * to file_ptr *. (print_strings): Change parameter and variable `start' type file_off to file_ptr. * configure: Regenerate. * config.in: Regenerate.
* Updated soruces in binutils/* to compile cleanly with -Wc++-compat.Nick Clifton2009-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * strings.c (main): Delay parsing of decimal digits.Alan Modra2009-06-041-3/+8
|
* PR 9972Nick Clifton2009-04-011-2/+4
| | | | | | * doc/binutils.texi (strings): Document the -V alias for the --version option. * strings.c (usage): Likewise.
* * strings.c (main): New variable `s'. Have string_min parsingJan Kratochvil2008-11-261-2/+7
| | | | call fatal for invalid input strings.
* * sysdep.h: Include "binary-io.h".Alan Modra2008-08-251-14/+0
| | | | | | | | | (O_BINARY): Don't define here. * bin2c.c (O_BINARY, O_TEXT, SET_BINARY): Don't define here. * strings.c: Likewise. (main): Remove #ifdef SET_BINARY. * Makefile.am: Run "make dep-am" * Makefile.in: Regenerate.
* PR binutils/6449Nick Clifton2008-04-281-6/+1
| | | | | | | | | * objdump.c (slurp_file): Open the file in binary mode. * ar.c: Remove conditional definition of O_BINARY. * bin2.c: Likewise. * rename.c: Likewise. * strings.c: Likewise. * sysdep.h: Add conditional definition of O_BINARY.
* PR binutils/5713Nick Clifton2008-02-151-57/+6
| | | | | | | | | | * strings.c (integer_arg): Delete function. (string_min): Initialise to 4. (main): Use strtoul to parse integer arguments. Move check for an invalid string length to after all the arguments have been parsed. (usage): Use indentation to indicate that -<n> is a another form of the --bytes= command line option.
* 2008-02-08 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2008-02-081-1/+1
| | | | | PR binutils/5713 * strings.c (main): Set string_min to 4 if it is <= 0.
* Add mingw I64 support for printing long and long long valuesNick Clifton2008-01-251-4/+22
|
* * strings.c (print_strings): Don't use %L, use %ll in printfAlan Modra2007-10-241-12/+6
| | | | format strings.
* Change sources over to using GPLv3Nick Clifton2007-07-051-1/+1
|
* bfd/Alan Modra2007-04-261-6/+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.
* top level:Joseph Myers2007-02-171-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.
* 2006-09-26 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2006-09-261-1/+1
| | | | | PR binutils/3257 * strings.c (main): Handle "-T format".
* PR binutils/2879Nick Clifton2006-07-061-1/+2
| | | | | * doc/binutils.texi: Document -T shorthand for --target switch. * strings.c: Update comment to include -T option.
* * addr2line.c (usage): Document @file.Mark Mitchell2005-10-031-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.
* * addr2line.c (main): Likewise.Mark Mitchell2005-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add check to avoid corrupt input files whose section sizes are greater thanNick Clifton2005-07-051-17/+66
| | | | the size of the input file.
* Patch from Steve Ellcey for hpux build failure.Jim Wilson2005-06-031-1/+6
| | | | | | | | * configure.in: Check for getc_unlocked prototype. * configure: Regenerate. * config.in: Regenerate. * strings.c (get_char): Only call getc_unlocked if we have seen a prototype.
* Update FSF addressNick Clifton2005-05-081-2/+2
|
* strings.c (usage): Place radix values for -t option into the correct order.Nick Clifton2004-10-181-1/+1
| | | | | | | | | | objcopy.c (add_redefine_syms_file): Change error messages to use <filename>:<linenumber>: format for easier parsing by automatic tools. srconv.c (show_usage): Fix spelling typo. windres.c (format_from_filename): Suggest the use of -J instead of -I if the file type cannot be determined.
* strings.c: Include <sys/stat.h>.Nick Clifton2004-10-181-0/+1
|
* * strings.c (statbuf): New typedef.Jakub Jelinek2004-10-131-2/+18
| | | | | | | | | (file_stat): Define. (strings_object_file): Avoid using get_file_size, instead do the checks here, using file_stat. * configure.in (HAVE_STAT64): New test. * configure: Rebuilt. * config.in: Rebuilt.
* * objcopy.c (copy_section): Use bfd_get_section_size instead ofAlan Modra2004-06-151-1/+1
| | | | | | | | | | | | | | | | _raw_size or bfd_get_section_size_before_reloc. Don't set reloc_done. (compare_section_lma): Likewise. * addr2line.c (find_address_in_section): Likewise. * coffgrok.c (do_sections_p1): Likewise. * dlltool.c (scan_drectve_symbols): Likewise. * nlmconv.c (main): Likewise. (copy_sections): Likewise. (powerpc_mangle_relocs): Likewise. * objdump.c (disassemble_section): Likewise. * prdbg.c (find_address_in_section): Likewise. * size.c (berkeley_sum): Likewise. * srconv.c (wr_ob): Likewise. * strings.c (strings_a_section): Likewise.
* * strings.c (print_strings): Cast file_off to unsigned long inAlan Modra2004-04-141-3/+4
| | | | printf arg list.
* Use consistent error messages for missing files.Nick Clifton2003-11-071-0/+3
| | | | Detect directories where an ordinary file is expected.
* * addr2line.c: Convert to ISO C90 prototypes, change PTR, removeAndreas Jaeger2003-09-141-47/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unneeded (void *) casts. * ar.c: Likewise. * arlex.l: Likewise. * arparse.y: Likewise. * arsup.c: Likewise. * binemul.c: Likewise. * binemul.h: Likewise. * bucomm.c: Likewise. * bucomm.h: Likewise. * budbg.h: Likewise. * budemang.c: Likewise. * budemang.h: Likewise. * coffdump.c: Likewise. * coffgrok.c: Likewise. * cxxfilt.c: Likewise. * debug.c: Likewise. * debug.h: Likewise. * deflex.l: Likewise. * dlltool.c: Likewise. * dlltool.h: Likewise. * dllwrap.c: Likewise. * emul_aix.c: Likewise. * filemode.c: Likewise. * ieee.c: Likewise. * nlmconv.c: Likewise. * nlmconv.h: Likewise. * nlmheader.y: Likewise. * nm.c: Likewise. * prdbg.c: Likewise. * rclex.l: Likewise. * rcparse.y: Likewise. * rdcoff.c: Likewise. * rddbg.c: Likewise. * rename.c: Likewise. * resbin.c: Likewise. * rescoff.c: Likewise. * resrc.c: Likewise. * size.c: Likewise. * srconv.c: Likewise. * stabs.c: Likewise. * strings.c: Likewise. * sysdump.c: Likewise. * sysinfo.y: Likewise. * syslex.l: Likewise. * unwind-ia64.c: Likewise. * unwind-ia64.h: Likewise. * version.c: Likewise. * windres.c: Likewise. * windres.h: Likewise. * winduni.c: Likewise. * wrstabs.c: Likewise.
* Add support for 'S' encoding to strings - display 8-bit characters.Nick Clifton2002-12-231-26/+27
|
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-47/+53
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* * arlex.l: Use #include "" instead of <> for local header files.Alan Modra2002-05-251-1/+1
| | | | | | | | | | | | | * coffdump.c: Likewise. * coffgrok.c: Likewise. * nlmconv.c: Likewise. * nlmheader.y: Likewise. * srconv.c: Likewise. * strings.c: Likewise. * sysdump.c: Likewise. * unwind-ia64.h: Likewise. * windres.h: Likewise. * winduni.h: Likewise.
* Tidy up formatting of --help output.Nick Clifton2002-01-231-8/+19
|
* * addr2line.c (main): Protoype.Thiemo Seufer2001-12-181-0/+2
| | | | | | | | | | * ar.c (main): Protoype. * nm.c (main): Protoype. * objcopy.c (main): Protoype. * objdump.c (main): Protoype. * size.c (main): Protoype. * strings.c (main): Protoype. * gasp.c (main): Protoype.
* * config.bfd: Remove trailing blanks.Thiemo Seufer2001-12-041-1/+1
| | | | | | | | | | | | | | * elf32-mips.c (gprel16_with_gp): Remove superfluous casts. * strings.c (get_char): Initialize value. * config/tc-mips.c (mips_cpreturn_offset): Better comment. (load_register): Better error message. Cast away signedness mismatches. Add casts needed for varargs. (load_address): Replace checks of HAVE_64BIT_ADDRESS with dbl. Remove superfluous casts. (macro): Cast away signedness mismatches. Remove superfluous casts. (s_cpload): Fix wrong comment. (s_mips_weakext): Standardize output message. (get_number): Likewise.
* * strings.c: Include config.h before bfd.h.Jakub Jelinek2001-12-041-13/+58
| | | | | | | | | | | | | | | (file_off): New type. (file_open): Define. (print_strings): Use file_off instead of file_ptr. Print addresses which don't fit into long correctly. (get_char): Use file_off instead of file_ptr. Use getc_unlocked if available. (strings_file): Use file_off instead of file_ptr. Use file_open. * configure.in: Check for getc_unlocked. Check for fopen64 and whether _LARGEFILE64_SOURCE needs to be defined for it. * configure: Rebuilt. * config.h.in: Rebuilt.
* * nlmconv.c: Fix warnings about unused attributes and functionAndreas Jaeger2001-09-241-0/+2
| | | | | | prototypes. * strings.c: Add prototype for get_char.
* Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu2001-09-191-10/+3
|
* Add new command line option '--encoding' to stringsNick Clifton2001-09-141-37/+117
|
* Support printable characters outside of the ASCII rangeNick Clifton2001-04-271-2/+5
|
* Fix typos in ChangeLogs and update copyright noticesNick Clifton2001-03-131-1/+1
|
* * strings.c (isgraphic): Interpret <TAB> as a printable character,David O'Brien2000-06-021-2/+2
| | | | | | | analogous to <SPACE>. Approved by: Nick Clifton <nickc@cygnus.com> <200005222243.PAA14590@elmo.cygnus.com>
* Eli Zaretskii's DOSish file name patches.Alan Modra2000-05-261-0/+20
|
* A mostly cosmetic tidy up of warnings and error message reporting.Alan Modra2000-04-071-6/+4
|
* Move translated part of bug report string back into .c files soAlan Modra2000-04-041-1/+1
| | | | xgettext can find it. Regnerate .pot files.
* Move bug report string to one place.Alan Modra2000-04-031-1/+1
|
* * strings.c (main): Correct handling of numeric argument.Ian Lance Taylor1999-12-261-1/+1
|
* Initial revisionRichard Henderson1999-05-031-0/+514