Commit Graph

39 Commits

Author SHA1 Message Date
Nick Clifton 91d6fa6a03 Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
2009-12-11 13:42:17 +00:00
Jan Kratochvil a3029abda0 binutils/
* bucomm.c (get_file_size): Update comment for the error return value.
2009-11-08 23:01:57 +00:00
Nick Clifton 3f5e193bd6 Updated soruces in binutils/* to compile cleanly with -Wc++-compat.
* 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-10 13:40:44 +00:00
Alan Modra aa820537ea update copyright dates 2009-09-02 07:25:43 +00:00
H.J. Lu 52a476eeda 2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10321
	* bucomm.c (get_file_size): Return -1 on error.

	* objcopy.c (copy_file): Report empty file.
2009-06-27 17:19:02 +00:00
Alan Modra 8d8e0703f4 PR 9798
* 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.
2009-01-29 13:03:21 +00:00
Nick Clifton d25576aadb PR binutils/55326
* bucomm.c (list_supported_architectures): Free architecture list after use.
   * windres.c (set_endianess): Likewise.
   * windmc.c (set_endianess): Likewise.
2008-01-09 10:40:32 +00:00
Nathan Sidwell 2db6cde736 * bucomm.c (bfd_nonfatal_message): New.
* 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.
2007-08-30 10:19:03 +00:00
Nick Clifton 32866df75e Change sources over to using GPLv3 2007-07-05 16:54:46 +00:00
Alan Modra 3db64b0092 bfd/
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-26 14:47:00 +00:00
H.J. Lu c428fa83c2 bfd/
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-03-15 14:17:20 +00:00
H.J. Lu 2946671ecd 2007-01-11 H.J. Lu <hongjiu.lu@intel.com>
* bucomm.c (template_in_dir): Fix typo.
2007-01-11 23:13:10 +00:00
Alan Modra 485be06348 * bucomm.h (make_tempdir): Declare independently of HAVE_MKDTEMP.
* 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.
2007-01-10 13:36:34 +00:00
Nick Clifton f9c026a85b PR binutils/2876
* 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.
2006-10-13 09:43:29 +00:00
Ben Elliston 91610c0c67 * bucomm.c (display_target_list): Make local variable `a' to be of
type enum bfd_architecture.  Thus no need to cast enums to int.
	(display_info_table): Likewise.
2006-03-13 22:27:22 +00:00
H.J. Lu 77f762d6e4 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
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.
2005-06-14 13:26:42 +00:00
Nick Clifton b43b5d5f76 Update FSF address 2005-05-08 14:17:41 +00:00
H.J. Lu cba1200696 2005-04-29 H.J. Lu <hongjiu.lu@intel.com>
* bucomm.c: Undo the last change.
	* bucomm.h: Likewise.
2005-04-29 16:49:20 +00:00
Ben Elliston 85b1c36d31 * ar.c (mri_mode): Make static.
* 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.
2005-04-29 00:03:33 +00:00
Nick Clifton f24ddbddc5 Use consistent error messages for missing files.
Detect directories where an ordinary file is expected.
2003-11-07 12:19:34 +00:00
Andreas Jaeger 2da42df615 * addr2line.c: Convert to ISO C90 prototypes, change PTR, remove
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.
2003-09-14 12:20:17 +00:00
Nick Clifton 06d86cf78e Move display_info() function into bucomm.c 2003-03-24 11:28:35 +00:00
Alan Modra b34976b65a s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE.  Formatting.
2002-11-30 08:39:46 +00:00
Alan Modra 48417c1acc * bucomm.c (list_supported_targets): Use bfd_target_list. 2002-10-15 11:34:01 +00:00
Alan Modra b1f88ebebf * bucomm.c: Replace CONST with const.
* nm.c: Likewise.
	* objdump.c: Likewise.
2002-06-08 07:38:30 +00:00
Kazu Hirata f462a9ea21 * addr2line.c: Fix formatting.
* 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.
2002-05-19 16:17:54 +00:00
H.J. Lu af667503bb 2001-11-29 H.J. Lu <hjl@gnu.org>
* bucomm.c (make_tempname): Revert the changes made on
	2001-11-14 and 2001-11-12. They won't work with directories.
2001-11-29 18:51:21 +00:00
Nick Clifton a6a256529f Replace use of mkstemp with mkstemps, provided by libiberty. 2001-11-14 11:56:41 +00:00
Nick Clifton 7559e86e56 Use mkstemp in place of mktemp. 2001-11-12 16:17:39 +00:00
Alan Modra 451dad9c58 * bucomm.c (fatal): Define using VPARAMS, VA_OPEN, VA_FIXEDARG,
VA_CLOSE.
	(non_fatal): Likewise.
	* objdump.c (objdump_sprintf): Likewise.
	* readelf.c (error): Likewise.
	(warn): Likewise.
2001-09-26 01:55:19 +00:00
Alan Modra 2f83960e2c * bucomm.c (list_supported_architectures): New function.
* bucomm.h (list_supported_architectures): Declare.
	* objdump.c (usage): Call the above.
2001-07-29 05:31:43 +00:00
Nick Clifton 8c2bc6877d Fix typos in ChangeLogs and update copyright notices 2001-03-13 06:43:59 +00:00
Nick Clifton 7340082dc8 Change bfd_target_vector from an array to a pointer 2001-02-07 23:16:22 +00:00
Alan Modra a0c0ddf7e8 Revert incorrect 2000-06-25 patch. 2000-06-26 23:15:58 +00:00
Nick Clifton 307ff1df12 Advance past both parts of dos based <letter>: filepath prefix. 2000-06-25 16:30:27 +00:00
Alan Modra 2ab47eed68 Correct pointer comparisons relying on NULL less than any other pointer.
Alexander Aganichev's fix for ieee.c
2000-06-20 12:33:21 +00:00
Alan Modra 5af11cab92 Eli Zaretskii's DOSish file name patches. 2000-05-26 13:11:57 +00:00
Alan Modra 37cc8ec1be A mostly cosmetic tidy up of warnings and error message reporting. 2000-04-07 04:34:50 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00