summaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
Commit message (Collapse)AuthorAgeFilesLines
* PR binutils/14302Nick Clifton2012-06-291-2/+4
| | | | | | | | * bucomm.c (print_arelt_descr): Correctly report the archive size field (for 'ar tv'). * ar.c (print_contents): Use correct types for archive element sizes (for 'ar p'). (extract_file): Likewise (for 'ar x').
* * 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.
* 2011-10-13 Nick Clifton <nickc@redhat.com>Nick Clifton2011-10-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes to aid translation: * addr2line.c (translate_address): Add comments describing context of a couple of printf statements. * ar.c (write_archive): Allow translation of error message. * bucomm.c (endian_string): Allow translation of strings. (display_target_list): Allow translation. * coffdump.c (dump_coff_type): Allow translation of output. (dump_coff_where): Likewise. (dump_coff_symbol): Likewise. (dump_coff_scope): Likewise. (dump_coff_sfile): Likewise. (dump_coff_section): Likewise. (coff_dump): Likewise. * dlltool (def_version): Allow translation of output. (run): Likewise. * dllwrap.c (run): Allow translation of output. * dwarf.c (print_dwarf_vma): Allow translation of output. (process_extended_line_op): Remove spurious translation. Add translation for strings that can be translated. (decode_location_exression): Allow translation of output. (read_and_display_attr_value): Allow translation of output. * readelf.c (slurp_rela_relocs): Add translation for error messages when failing to get data. (slurp_rel_relocs): Likewise. (get_32bit_elf_symbols): Likewise. (get_64bit_elf_symbols): Likewise. (dump_ia64_vms_dynamic_relocs): Replace abbreviation with full word. (process_relocs): Remove spurious translation. (decode_tic6x_unwind_bytecode): Likewise. (process_version_section): Improve error messages. (process_mips_specific): Likewise. (print_gnu_note): Remove spurious translation. (print_stapsdt_note): Likewise. (get_ia64_vms_note_type): Likewise. * sysdump.c (getCHARS): Allow translation. (fillup): Allow translation of output. (getone): Likewise. (must): Likewise. (derived_type): Likewise. * doc/binutils.doc (addr2line): Extend description of command line options. * po/binutils.pot: Regenerate.
* * bucomm.c (make_tempname): Stop memory leak.Nick Clifton2011-03-251-1/+4
| | | | ICVS: ----------------------------------------------------------------------
* * bucomm.c (get_file_size): Check for negative sizes and issue aNick Clifton2011-01-061-1/+4
| | | | warning message if encountered.
* * bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno.Alan Modra2010-10-051-2/+2
|
* * bucomm.c (bfd_nonfatal): Flush stdout before output to stderr.Alan Modra2010-10-051-5/+13
| | | | | | | | | | | | | | (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.
* Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton2009-12-111-6/+6
| | | | Fix up all warnings generated by the addition of this switch.
* binutils/Jan Kratochvil2009-11-081-1/+1
| | | | * bucomm.c (get_file_size): Update comment for the error return value.
* Updated soruces in binutils/* to compile cleanly with -Wc++-compat.Nick Clifton2009-09-101-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* update copyright datesAlan Modra2009-09-021-1/+1
|
* 2009-06-27 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-06-271-1/+1
| | | | | | | PR binutils/10321 * bucomm.c (get_file_size): Return -1 on error. * objcopy.c (copy_file): Report empty file.
* PR 9798Alan Modra2009-01-291-3/+3
| | | | | | | | | | | | | * bucomm.c (bfd_nonfatal_message): Use bfd_get_archive_filename. (bfd_get_archive_filename): Constify param. * bucomm.h (bfd_get_archive_filename): Update prototype. * objcopy.c (RETURN_NONFATAL): Delete. (copy_unknown_object): Don't call bfd_get_archive_filename for bfd_nonfatal_message filename, instead just pass bfd. (copy_object): Likewise. (copy_archive, copy_file): Likewise. Expand RETURN_NONFATAL. On bfd_close errors, do not pass the bfd to bfd_nonfatal_message. (setup_bfd_headers): Fix error message.
* PR binutils/55326Nick Clifton2008-01-091-2/+4
| | | | | | * bucomm.c (list_supported_architectures): Free architecture list after use. * windres.c (set_endianess): Likewise. * windmc.c (set_endianess): Likewise.
* * bucomm.c (bfd_nonfatal_message): New.Nathan Sidwell2007-08-301-0/+46
| | | | | | | | | | * bucomm.h (bfd_nonfatal_message): Declare. * objcopy.c (RETURN_NONFATAL): Take BFD not NAME, use bfd_nonfatal_message. (copy_unknown_object): Adjust bfd_nonfatal and RETURN_NONFATAL calls, or replace with bfd_nonfatal_message calls as appropriate. (copy_object, copy_archive, copy_file, setup_section, copy_section, write_debugging_info): Likewise.
* Change sources over to using GPLv3Nick Clifton2007-07-051-1/+1
|
* bfd/Alan Modra2007-04-261-2/+3
| | | | | | | | | | | | | | | | | | | | 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.
* bfd/H.J. Lu2007-03-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-03-15 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (bfdver.h): Substitute report_bugs_to. Also create doc/bfdver.texi. * Makefile.in: Regenerated. * configure.in (--with-bugurl): New option. * configure: Regenerated. * version.h (REPORT_BUGS_TO): New. binutils/ 2007-03-15 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (REPORT_BUGS_TO): Removed. (INCLUDES): Remove -DREPORT_BUGS_TO. * Makefile.in: Regenerated. * bucomm.c: Don't include bfdver.h. * objdump.c: Likewise. * version.c: Likewise. * bucomm.h: Include bfdver.h. * configure.in (--with-bugurl): Removed. * configure: Regenerated. * doc/Makefile.am (binutils_TEXINFOS): Removed. (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc. (TEXI2DVI): Likewise. (config.texi): Removed. (MOSTLYCLEANFILES): Remove config.texi. * doc/Makefile.in: Regenerated. * doc/binutils.texi: Include bfdver.texi instead of config.texi. gas/ 2007-03-15 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (REPORT_BUGS_TO): Removed. (INCLUDES): Remove -DREPORT_BUGS_TO. * Makefile.in: Regenerated. * configure.in (--with-bugurl): Removed. * configure: Regenerated. * doc/Makefile.am (as_TEXINFOS): Remove gasver.texi. (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc. (TEXI2DVI): Likewise. (gasver.texi): Removed. (MOSTLYCLEANFILES): Remove gasver.texi. (as.1): Don't depend on gasver.texi. * doc/Makefile.in: Regenerated. * doc/as.texi: Include bfdver.texi instead of gasver.texi. gprof/ 2007-03-15 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (REPORT_BUGS_TO): Removed. (INCLUDES): Remove -DREPORT_BUGS_TO. * Makefile.in: Regenerated. * configure.in (--with-bugurl): Removed. * configure: Regenerated. ld/ 2007-03-15 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (ld_TEXINFOS): Remove ldver.texi. (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc. (TEXI2DVI): Likewise. (REPORT_BUGS_TO): Removed. (INCLUDES): Remove -DREPORT_BUGS_TO. (ldver.texi): Likewise. (ld.1): Don't depend on ldver.texi. (MOSTLYCLEANFILES): Remove ldver.texi. * Makefile.in: Regenerated. * configure.in (--with-bugurl): Removed. * configure: Regenerated. * lexsup.c: Include bfdver.h. * ld.texinfo: Include bfdver.texi instead of ldver.texi.
* 2007-01-11 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2007-01-111-2/+2
| | | | * bucomm.c (template_in_dir): Fix typo.
* * bucomm.h (make_tempdir): Declare independently of HAVE_MKDTEMP.Alan Modra2007-01-101-66/+58
| | | | | | | | | | * bucomm.c (template_in_dir): New function, split out from.. (make_tempname): ..here. Open the file with O_EXCL if !HAVE_MKSTEMP. (make_tempdir): Use template_in_dir. Handle directory creation when !HAVE_MKDTEMP. * objcopy.c (MKDIR): Don't define. (copy_archive): Use make_tempdir when !HAVE_MKDTEMP too. Fix error message.
* PR binutils/2876Nick Clifton2006-10-131-3/+60
| | | | | | | | | | | | | | | * configure.in: Check for the mkstemp and mkdtemp functions. * configure: Regenerate. * config.in (HAVE_MKDTEMP): New potential define. (MAKE_MKSTEMP): Likewise. * bucomm.c (make_tempname): Use mkstemp if it is available. * make_tempdir): New function: Create a temporary directory using mkdtemp, if it is available. * bucomm.h (make_tempdir): New prototype. * objcopy.c (copy_archive): Use make_tempdir if it is available. (strip_main): Produce an warning message if a temporary file could not be (copy_main): Likewise. * ar.c (write_archive): Likewise.
* * bucomm.c (display_target_list): Make local variable `a' to be ofBen Elliston2006-03-131-4/+4
| | | | | type enum bfd_architecture. Thus no need to cast enums to int. (display_info_table): Likewise.
* 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-06-141-0/+36
| | | | | | | | | | | | | | | | PR 995 * ar.c (BUFSIZE): Moved to ... * bucomm.h (BUFSIZE): Here. * bucomm.c: Include <assert.h>. (bfd_get_archive_filename): New. * bucomm.h (bfd_get_archive_filename): New. * objcopy.c (copy_unknown_object): New. (copy_object): Use bfd_get_archive_filename when reporting input error. Don't call fatal on unknown arch. (copy_archive): Call copy_unknown_object on unknown format or arch.
* Update FSF addressNick Clifton2005-05-081-2/+2
|
* 2005-04-29 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2005-04-291-1/+1
| | | | | * bucomm.c: Undo the last change. * bucomm.h: Likewise.
* * ar.c (mri_mode): Make static.Ben Elliston2005-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | * arsup.c (obfd, real_name, outfile): Likewise. * binemul.c (ar_emul_create): Remove unused function. (ar_emul_default_create): Likewise. * binemul.h (ar_emul_create): Remove declaration. (ar_emul_default_create): Likewise. (struct bin_emulation_xfer_struct): Remove ar_create member. * bucomm.c (report): Make static. * bucomm.h (report): Remove declaration. * cxxfilt.c (mbuffer): Make static. (main): Use unsigned ints for some loop control variables. * readelf.c: Make many global variables static. * size.c (berkeley_format): Make static. (long_options): Likewise. * emul_aix.c (bin_aix_emulation): Remove ar_emul_default_create structure initialiser. (bin_aix5_emulation): Likewise. * emul_vanilla.c (bin_vanilla_emulation): Likewise.
* Use consistent error messages for missing files.Nick Clifton2003-11-071-0/+25
| | | | Detect directories where an ordinary file is expected.
* * addr2line.c: Convert to ISO C90 prototypes, change PTR, removeAndreas Jaeger2003-09-141-37/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Move display_info() function into bucomm.cNick Clifton2003-03-241-2/+205
|
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-2/+2
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* * bucomm.c (list_supported_targets): Use bfd_target_list.Alan Modra2002-10-151-4/+6
|
* * bucomm.c: Replace CONST with const.Alan Modra2002-06-081-5/+5
| | | | | * nm.c: Likewise. * objdump.c: Likewise.
* * addr2line.c: Fix formatting.Kazu Hirata2002-05-191-1/+1
| | | | | | | | | | | | * ar.c: Likewise. * arsup.c: Likewise. * arsup.h: Likewise. * binemul.c: Likewise. * binemul.h: Likewise. * bucomm.c: Likewise. * coffdump.c: Likewise. * coffgrok.c: Likewise. * coffgrok.h: Likewise.
* 2001-11-29 H.J. Lu <hjl@gnu.org>H.J. Lu2001-11-291-5/+2
| | | | | * bucomm.c (make_tempname): Revert the changes made on 2001-11-14 and 2001-11-12. They won't work with directories.
* Replace use of mkstemp with mkstemps, provided by libiberty.Nick Clifton2001-11-141-2/+5
|
* Use mkstemp in place of mktemp.Nick Clifton2001-11-121-2/+2
|
* * bucomm.c (fatal): Define using VPARAMS, VA_OPEN, VA_FIXEDARG,Alan Modra2001-09-261-37/+8
| | | | | | | | VA_CLOSE. (non_fatal): Likewise. * objdump.c (objdump_sprintf): Likewise. * readelf.c (error): Likewise. (warn): Likewise.
* * bucomm.c (list_supported_architectures): New function.Alan Modra2001-07-291-0/+19
| | | | | * bucomm.h (list_supported_architectures): Declare. * objdump.c (usage): Call the above.
* Fix typos in ChangeLogs and update copyright noticesNick Clifton2001-03-131-1/+1
|
* Change bfd_target_vector from an array to a pointerNick Clifton2001-02-071-1/+1
|
* Revert incorrect 2000-06-25 patch.Alan Modra2000-06-261-1/+1
|
* Advance past both parts of dos based <letter>: filepath prefix.Nick Clifton2000-06-251-1/+1
|
* Correct pointer comparisons relying on NULL less than any other pointer.Alan Modra2000-06-201-1/+1
| | | | Alexander Aganichev's fix for ieee.c
* Eli Zaretskii's DOSish file name patches.Alan Modra2000-05-261-4/+18
|
* A mostly cosmetic tidy up of warnings and error message reporting.Alan Modra2000-04-071-8/+3
|
* Initial revisionRichard Henderson1999-05-031-0/+266