Commit Graph

121 Commits

Author SHA1 Message Date
Alan Modra c177f3771c Use bfd_get_filename throughout binutils
* ar.c (map_over_members, get_pos_bfd, delete_members, move_members),
	(replace_members): Use bfd_get_filename rather than accessing
	bfd->filename directly.
	* arsup.c (map_over_list, ar_delete, ar_replace, ar_extract): Likewise.
	* binemul.c (do_ar_emul_append): Likewise.
	* coffgrok.c (coff_grok): Likewise.
2020-05-19 12:35:56 +09:30
H.J. Lu 3d98c46092 plugin: Don't invoke LTO-wrapper
Don't invoke LTO-wrapper since the LTO wrapper approach is not only
slow but also unreliable.  For GCC 10 or newer, LDPT_ADD_SYMBOLS_V2
will be used.

bfd/

	* configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
	(EXECUTABLE_SUFFIX): Likewise.
	* config.in: Regenerated.
	* configure: Likewise.
	* plugin.c (bfd_plugin_close_and_cleanup): Defined as
	_bfd_generic_close_and_cleanup.
	(plugin_list_entry): Remove resolution_file, resolution_option,
	real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
	lto_wrapper, gcc_env and initialized,
	(need_lto_wrapper_p): Removed.
	(get_lto_wrapper): Likewise.
	(setup_lto_wrapper_env): Likewise.
	(register_all_symbols_read): Likewise.
	(egister_cleanup): Likewise.
	(get_symbols): Likewise.
	(add_input_file): Likewise.
	(bfd_plugin_set_program_name): Remove need_lto_wrapper.
	(add_symbols): Updated.
	(try_claim): Likewise.
	(try_load_plugin): Likewise.
	(bfd_plugin_canonicalize_symtab): Likewise.
	* plugin.h (bfd_plugin_set_program_name): Remove int argument.
	(plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.

binutils/

	* ar.c (main): Update bfd_plugin_set_program_name call.
	* nm.c (main): Likewise.

ld/

	* testsuite/ld-plugin/lto.exp (lto_link_tests): Run PR ld/25355
	test only for GCC 10 or newer.
2020-03-20 03:55:30 -07:00
H.J. Lu ecda90163e Don't call lto-wrapper for ar and ranlib
Since ar and ranlib don't need to know symbol types to work properly,
we should avoid calling lto-wrapper for them to speed them up.

bfd/

	PR binutils/25584
	* plugin.c (need_lto_wrapper_p): New.
	(bfd_plugin_set_program_name): Add an int argument to set
	need_lto_wrapper_p.
	(get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
	set.
	* plugin.h (bfd_plugin_set_program_name): Add an int argument.

binutils/

	PR binutils/25584
	* ar.c (main): Pass 0 to bfd_plugin_set_program_name.
	* nm.c (main): Pass 1 to bfd_plugin_set_program_name.
2020-02-25 03:31:40 -08:00
Alan Modra b3adc24a07 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
Nick Clifton e264b5b7a5 Allow the --output option of the "ar" prorgam to extract files to locations outside of the current directory.
* ar.c (open_output_file): Check for filename validity before
	prefixing with output directory.
	Display the constructed output filename if in verbose mode.
	(extract_file): Let open_output_file display the filename.
2019-11-07 11:56:54 +00:00
Fangrui Song 197245e341 Add a --output=<DIR> option to ar to allow the specifying of an output directory.
* ar.c (emum long option numbers): Declare.  Use to provide
	numerical values for long options.
	(long_options): Add --output option.
	(usage): Mention the --output option.
	(open_output_file): New function.  Create a filepath for an output
	file and open it.
	(extract_file): Use open_output_file().
	(open_output_file):
	* testsuite/binutils-all/ar.exp: Add a test of the new feature.
	* doc/binutils.texi: Document the new feature.
	* NEWS: Mention the new feature.
2019-10-30 10:50:23 +00:00
Alan Modra 95cc7c169c ar P support
This patch extends "ar P" to allow creation of normal (as distinct
from thin) archives with full path names.

	PR 452
	PR 25104
bfd/
	* archive.c (normalize): Return file unchanged when
	BFD_ARCHIVE_FULL_PATH.
	(_bfd_construct_extended_name_table): Pass abfd, the output
	bfd, to normalize.
	(_bfd_archive_bsd44_construct_extended_name_table): Likewise.
	* bfd.c (struct bfd): Make flags a full flagword.
	(BFD_ARCHIVE_FULL_PATH): Define.
	* bfd-in2.h: Regenerate.
binutils/
	* ar.c (write_archive): Set BFD_ARCHIVE_FULL_PATH.
	* doc/binutils.texi (extract from archive): Mention
	restrictions when extracting from archives with full paths.
	(ar P): Update to current P support.
	(ar -X32_64): Fix spelling.
2019-10-21 16:13:39 +10:30
Alan Modra b7d9d3ee59 PR25079, "ar s" stopped working
's' is both a command and a modifier.  If given as a command then we
aren't lacking an operation.  I think the same goes when mri mode is
selected: any following command line used to be ignored.

	PR 25079
	* ar.c (decode_options): Don't try for command options if
	write_armap or mri_mode is selected.
2019-10-09 00:20:28 +10:30
Alan Modra 00f93c4492 bfd macro conversion to inline functions
This converts some of the macros that access struct bfd fields to
inline functions.

bfd/
	* archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
	* bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
	(bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
	(bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
	(bfd_get_file_flags, bfd_applicable_file_flags),
	(bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
	(bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
	(bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
	(bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
	* bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
	(bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
	(bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
	(bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
	(bfd_usrdata, bfd_set_usrdata): New inline functions.
	* targets.c (bfd_get_target, bfd_get_flavour),
	(bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
	(bfd_little_endian, bfd_header_big_endian),
	(bfd_header_little_endian, bfd_applicable_section_flags),
	(bfd_get_symbol_leading_char): New inline functions.
	* bfd-in2.h: Regenerate.
binutils/
	* ar.c (write_archive): Use bfd_set_thin_archive.
gdb/
	* gdb_bfd.c (gdb_bfd_ref, gdb_bfd_unref): Use bfd_set_usrdata.
	* dwarf2read.c (dwarf2_read_gdb_index, dwarf2_read_debug_names),
	(read_indirect_string_from_dwz): Use bfd accessor.
	* dwarf2read.h (struct dwz_file <filename>): Likewise.
	* machoread.c (macho_symfile_read_all_oso): Likewise.
	* solib.c (solib_bfd_open): Likewise.
ld/
	* ldelf.c (ldelf_after_open, ldelf_place_orphan
	* ldlang.c (walk_wild_file, lang_process): Use bfd_usrdata.
	(load_symbols, ldlang_add_file): Use bfd_set_usrdata.
	* ldmain.c (add_archive_element): Use bfd_usrdata.
	* ldlang.h (bfd_input_just_syms): New inline function.
	* emultempl/aarch64elf.em (build_section_lists): Use it.
	* emultempl/mmo.em (mmo_place_orphan): Likewise.
	* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
	* emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
	* emultempl/ppc64elf.em (build_section_lists): Likewise.
sim/
	* ppc/emul_generic.c (emul_add_tree_options): Delete old bfd code.
2019-09-20 18:04:02 +09:30
Nick Clifton 2f86d55940 Fix ar so that it can correctly detect non-dash prefixed options that appear after dash prefixed options.
PR 13256
	* ar.c (decode_options): Restart option scanning if no operation
	is detected and argument remain to be scanned.
2019-07-24 12:17:37 +01:00
Alan Modra 827041555a Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
Alan Modra bf2dd8d7cf BFD_INIT_MAGIC
This patch performs a run-time test that a shared libbfd.so has been
compiled with the same size bfd_vma as that of apps using the library.
On a 32-bit host it is easily possible to have one libbfd.so compiled
to support 64-bit targets (or configured with --enable-64-bit-bfd)
while another only supports 32-bit targets.  The two libraries will
have differently sized bfd_vma types, and if the wrong one is loaded
all sorts of weird behaviour might be seen.

bfd/
	PR 23534
	* init.c (BFD_INIT_MAGIC): Define.
	(bfd_init): Return BFD_INIT_MAGIC.
	bfd-in2.h: Regenerate.
binutils/
	PR 23534
	* addr2line.c (main): Exit with fatal error if bfd_init
	returns an unexpected value.
	* ar.c (main): Likewise.
	* dlltool.c (identify_dll_for_implib): Likewise.
	* nm.c (main): Likewise.
	* objcopy.c (main): Likewise.
	* objdump.c (main): Likewise.
	* size.c (main): Likewise.
	* strings.c (main): Likewise.
	* windmc.c (main): Likewise.
	* windres.c (main): Likewise.
gas/
	PR 23534
	* as.c (main): Exit with fatal error if bfd_init returns an
	unexpected value.
ld/
	PR 23534
	* ldmain.c (main): Exit with fatal error if bfd_init returns
	an unexpected value.
2018-10-15 22:11:58 +10:30
Ant Bikeneev 1869e86f2e Add option to ar's 't' command to display the offset of elements within the archive.
PR 23107
	* ar.c (display_offsets): New variable.
	(usage): Add description of 'O' operator.
	(decode_option): Handle 'O' operator.
	(print_descr): Pass display_offsets to print_arelt_descr.
	* arsup.c: Update call to printy_arelt_descr.
	* objdump.c: Likewise.
	* bucomm.c (print_arelt_descr): If offsets parameter is true then
	display offset of archive element within the archive.
	* bucomm.h: Update prototype for print_arelt_descr.
	* doc/binutils.texi: Update description of ar command.
	* NEWS: Mention the new feature.
	* testsuite/binutils-all/ar.exp: Add text of new feature.
2018-05-30 17:08:03 +01:00
Alan Modra 219d1afa89 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
Nick Clifton 3cfd3dd095 Fix a memory leak when processing archives.
PR 22449
	* ar.c (write_archive): Free the temporary file name.
2017-11-17 12:46:07 +00:00
Nick Clifton 2a925816fc Correct previous fix for an absence of input files on the ar command line, so that a complaint is not issued in MRI mode.
PR 21433
	* ar.c (main): Skip check for no files on the command line when
	running in MRI mode.
2017-07-17 10:51:45 +01:00
Nick Clifton 740a463062 Fix invocation of stat() on a NULL pointer.
PR binutils/21407
	* bucomm.c (get_file_size): Return -1 if file_name is NULL.
	* ar.c (main): Fail with usage() invocation if no file names are
	provided.
2017-04-26 15:42:03 +01:00
Alan Modra 42354845ae PR 21418, ar -N lacks arg check
PR 21418
	* ar.c (main): Check -a, -b, -i and -N args are given.
2017-04-23 20:33:35 +09:30
Alan Modra 7034215fd6 PR 21417, ar arg check failure
PR 21417
	* ar.c (main): Check that an archive file is given after options.
2017-04-23 20:33:35 +09:30
Alan Modra 2571583aed Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
Alan Modra 7d0b9ebc1e Don't include libbfd.h outside of bfd, part 6
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-07-16 19:09:00 +09:30
Alan Modra 76e7a75123 Don't include libbfd.h outside of bfd, part 1
Make BFD_ALIGN available to objcopy.  Fix assertions.  Don't use
bfd_log2 in ppc32elf.em or bfd_malloc in xtensaelf.em and bucomm.c.

bfd/
	* libbfd-in.h (BFD_ALIGN): Move to..
	* bfd-in.h: ..here.
	* elf32-ppc.h (struct ppc_elf_params): Add pagesize.
	* elf32-ppc.c (default_params): Adjust init.
	(ppc_elf_link_params): Set pagesize_p2.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
binutils/
	* ar.c: Don't include libbfd.h.
	* objcopy.c: Likewise.
	* bucomm.c (bfd_get_archive_filename): Use xmalloc rather than
	bfd_malloc.
gas/
	* config/bfin-parse.y: Don't include libbfd.h.
	* config/tc-bfin.c: Likewise.
	* config/tc-rl78.c: Likewise.
	* config/tc-rx.c: Likewise.
	* config/tc-metag.c: Likewise.
	(create_dspreg_htabs, create_scond_htab): Use gas_assert not BFD_ASSERT.
	* Makefile.am: Update dependencies.
	* Makefile.in: Regenerate.
ld/
	* ldlang.c: Don't include libbfd.h.
	* emultempl/nds32elf.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/ppc32elf.em: Likewise.
	(pagesize): Delete.
	(params): Update init.
	(ppc_after_open_output): Use params.pagesize.  Don't call bfd_log2.
	(PARSE_AND_LIST_ARGS_CASES): Use params.pagesize.
	* emultempl/sh64elf.em: Don't include libbfd.h.
	(after_allocation): Use ASSERT, not BFD_ASSERT.
	* emultempl/xtensaelf.em: Don't include libbfd.h.
	(replace_insn_sec_with_prop_sec): Use xmalloc, not bfd_malloc.
	* Makefile.am: Update dependencies.
	* Makefile.in: Regenerate.
2016-07-16 13:25:11 +09:30
Alan Modra 3860d2b4b7 Delete bfd_my_archive macro
Many more places use abfd->my_archive rather than bfd_my_archive (abfd),
so let's make the code consistently use the first idiom.

bfd/
	* bfd-in.h (bfd_my_archive): Delete.
	* bfd-in2.h: Regenerate.
binutils/
	* ar.c: Expand uses of bfd_my_archive.
	* size.c: Likewise.
ld/
	* ldlang.c: Expand uses of bfd_my_archive.
	* ldmain.c: Likewise.
	* ldmisc.c: Likewise.
	* plugin.c: Likewise.
2016-06-14 13:24:37 +09:30
Alan Modra 6f2750feaf Copyright update for binutils 2016-01-01 23:00:01 +10:30
H.J. Lu 3aade68889 Remove trailing spaces in binutils 2015-08-12 04:42:37 -07:00
Nick Clifton 4e13f8fb05 Fix memory leak in ar if it encounters an invalid path whilst extracting files.
* ar.c (extract_file): Free cbuf if the path is invalid.
2015-08-04 14:50:40 +01:00
Nick Clifton 86eafac0aa Fix memory access violations triggered by running strip on fuzzed binaries.
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-21 17:37:23 +00:00
Alan Modra b90efa5b79 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
Nick Clifton dd9b91de21 Prevent archive memebers with illegal pathnames from being extracted from an archive.
PR binutils/17552, binutils/17533
	* bucomm.c (is_valid_archive_path): New function.  Returns false
	for absolute pathnames and pathnames that include /../.
	* bucomm.h (is_valid_archive_path): Add prototype.
	* ar.c (extract_file): Use new function to check for valid
	pathnames when extracting files from an archive.
	* objcopy.c (copy_archive): Likewise.
	* doc/binutils.texi: Update documentation to mention the
	limitation on pathname of archive members.
2014-11-06 14:49:10 +00:00
Markus Trippelsdorf 92b1b67865 This patch allows one to place the gcc's liblto_plugin in the 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-04-03 11:33:17 +01:00
Alan Modra 4b95cf5c0c Update copyright years 2014-03-05 22:16:15 +10:30
Nick Clifton 5cd84a722e * arsup.c (ar_save): Respect the deterministic setting when
reading from an mri script.
	* ar.c (main): Set the default deterministic mode when reading
	from an mri script.
2013-10-01 13:44:37 +00:00
Nick Clifton 0e135a02da PR binutils/15796
* ar.c (map_over_members): Correctly handle multiple same-name
	entries on the command line and in the archive.
2013-08-27 16:22:48 +00:00
Nick Clifton faf786e668 * ar.c (usage): Fix C conformance issue.
* config/tc-i386-intel.c (i386_intel_operand): Fixed signed vs
	unsigned comparison.
2013-07-18 16:12:35 +00:00
Nick Clifton a043396b72 PR binutils/15140
* ar.c (open_inarch): Fail on attempts to convert a normal archive
	to a thin archive or vice versa.
	* elfcomm.c (make_qualified_name): Handle corrupted thin
	archives.
	* readelf.c (process_archive): Likewise.
	* doc/binutils.texi: Clarify documentation describing thin
	archives.

	* archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
	accessing a corrupt nested archive.
2013-02-15 14:37:39 +00:00
Roland McGrath 955d0b3bd7 binutils/
* objcopy.c (deterministic): Make int rather than bfd_boolean,
	initialize to -1.
	(strip_options, copy_options): Add -U/--disable-deterministic-archives.
	(default_deterministic): New function.
	(strip_main, copy_main): Handle -U.  Call default_deterministic.
	(copy_usage, strip_usage): Describe -U.  Cite whether -D or -U is
	the default based on DEFAULT_AR_DETERMINISTIC.
	* doc/binutils.texi (objcopy, strip): Describe -U and effect of
	configure options on -D.

	* ar.c (default_deterministic): Comment fix.
2013-01-07 17:40:59 +00:00
Nick Clifton 34debcd10b PR binutils/14302
* 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').
2012-06-29 12:59:49 +00:00
Alan Modra dbb7c4414b * sysdep.h: Include sys/stat.h here.
* 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-02-09 04:51:44 +00:00
Nick Clifton 36e32b27f6 PR binutils/13493
* ar.c (ranlib_main): Process --plugin option.
	* doc/binutils.texi: Document --plugin support for ranlib.
2012-02-01 16:49:26 +00:00
Roland McGrath 9cb80f72d8 * configure.in (--enable-deterministic-archives): Grok new
argument.  Set DEFAULT_AR_DETERMINISTIC to 1 or 0 accordingly.
	* configure: Regenerated.
	* config.in: Regenerated.
	* ar.c (deterministic): Initialize to -1.
	(decode_options, ranlib_main): Grok U option.
	(usage, ranlib_usage): Mention U; say for D and U which is the default.
	(default_deterministic): New function.
	(ranlib_main): Call it.
	(main): Likewise.  Make newer_only && deterministic error
	non-fatal if it was just DEFAULT_AR_DETERMINISTIC and not the D option.
	* doc/binutils.texi (ar cmdline, ranlib): Document U modifier and
	--enable-deterministic-archives behavior.
2011-12-21 19:39:11 +00:00
Roland McGrath b3364cb9c2 * ar.c (ranlib_usage): Describe -D.
(ranlib_main): Parse -D.
	(ranlib_touch): Set BFD_DETERMINISTIC_OUTPUT under -D.
	* doc/binutils.texi (ranlib): Describe -D, and also --help/-h/-H.
2011-11-29 18:07:41 +00:00
H.J. Lu 746c5e8cf0 Set target from the the first object only if it isn't set.
2011-10-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/13278
	* ar.c (open_inarch): Set the target from the the first object
	on the list only if it isn't set.
2011-10-16 19:36:10 +00:00
Nick Clifton 9cf03b7e41 2011-10-13 Nick Clifton <nickc@redhat.com>
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.
2011-10-13 15:33:34 +00:00
Nick Clifton 75d5a45f82 PR binutils/12558
* ar.c (main): When asked to move members in an archive that is
	being created, ignore the move request.
2011-06-30 15:08:17 +00:00
Alan Modra 4510857d06 PR binutils/12720
Revert the following change
	Michael Snyder  <msnyder@vmware.com>
	* ar.c (move_members): Plug memory leak.
	(delete_members): Plug memory leak.
2011-05-02 06:04:11 +00:00
Nick Clifton 8e4850a9e3 * ar.c (write_archive): Plug memory leak. 2011-03-25 17:18:54 +00:00
Nick Clifton a1bc0327a3 * ar.c (delete_members): Plug memory leak. 2011-03-25 17:17:03 +00:00
Nick Clifton 6a6969108e * ar.c (move_members): Plug memory leak. 2011-03-25 17:14:02 +00:00
Alan Modra c60ce34ad5 PR 12590
* ar.c (ranlib_main): Init arg_index properly.
	(usage): Describe --target.
2011-03-17 12:56:35 +00:00
Alan Modra dbcf63876c * ar.c: Formatting.
(usage): Correct help strings.
	(decode_options): Correct getopt_long short options.  Remove
	duplicate non-handled option message.
	(main): Don't handle -M specially.
2010-12-08 05:05:30 +00:00