* coffdump.c (dump_coff_scope): Cast pointer to unsigned long for
printf.
* coffgrok.c: Include bucomm.h. Don't declare xmalloc.
(push_scope): Declare type of parameter link.
* size.c: Include libiberty.h.
* srconv.c: Include bucomm.h.
(find_base): Declare at top of file.
(wr_hd): Add default case to architecture switch.
(wr_dps_start): Declare type of parameter nest.
(wr_du): Comment out variables used only in commented out blocks.
(wr_dus): Remove unused variable i.
(wr_sc): Remove unused variables myinfo, low, and high.
* strings.c: Include libiberty.h.
* sysdump.c: Include <ctype.h>.
* objcopy.c (add_strip_symbol): New function, adds a name to an
explicit list of symbols to strip.
(is_strip_symbol): New function, reports whether the name argument
is in the explicit list.
(filter_symbols): Check against is_strip_symbol above all.
(strip_main): Recognize -N option. If used, don't default to
strip_all.
(copy_main): Recognize -N option.
(strip_usage): Document -N and --strip-symbol options.
(copy_usage): Ditto.
* objcopy.1, strip.1, binutils.texi: Document -N and
--strip-symbol options.
* Makefile.in (install-info): Install info files from whatever directory they
were found in.
Patch from DJ Delorie:
* configure.bat: do c++filt -> cxxfilt right
* sysinfo.y: Include system header files early, so any potential declaration of
abort() occurs before its use.
* strings.c (strings_file): Try opening the file in binary mode first.
(pad_to_set, pad_to): New static variables.
(copy_options): Accept --pad-to.
(copy_usage): Mention --pad-to.
(copy_object): Support --pad-to.
(compare_section_vma): Sort non loadable sections to the front.
Sort sections with the same VMA by size.
(copy_main): Handle --pad-to.
* binutils.texi, objcopy.1: Document --pad-to.
and the start address was not set using --set-start, default the
start address to zero. This hack is because the `binary' output
file format uses the start address to set the virtual address of
the first byte in the file.
* binutils.texi, objcopy.1: Add some notes on generating S-records
and binary files.
(adjust_start, set_start_set, set_start): New static variables.
(adjust_section_vma, adjust_sections): New static variables.
(copy_options): Add --adjust-start, --adjust-vma,
--adjust-section-vma, --adjust-warnings, --no-adjust-warnings,
--set-start.
(parse_vma): New static function.
(copy_usage): Mention new options.
(copy_object): Handle --set-start and --adjust-start.
(setup_section): Correct type of last argument to PTR. Set used
field if section is removed. Handle --adjust-vma and
--adjust-section-vma.
(copy_section): Correct type of last argument to PTR.
(mark_symbols_used_in_relocations): Likewise.
(strip_main): Clear used field when handling -R.
(copy_main): Handle new options.
* binutils.texi (objcopy): Document new options.
* objcopy.1: Document new options.
(sysinfo.c): Likewise. Also, depend upon arparse.c, to prevent a
parallel make from trying to build both arparse.c and sysinfo.c
simultaneously.
(nlmheader.c): Similar change.
(arparse.h): Separate target from arparse.c, so that a parallel
make does not try to build both at once. Depend upon arparse.c.
(sysinfo.h): Similar change.
(objdump_print_address): If aux->require_sec, require that the
symbol be in aux->sec even if HAS_RELOC is not set.
(disassemble_data): Set aux.require_sec around the
objdump_print_address call for the instruction address.
PR 3441.
(output_filename, output_file, output_bfd): New static variables.
(remove_output): New static function.
(main): Call xatexit (remove_output). Call xexit rather than
returning.
(extract_file): Set output_filename and output_file while output
file is open.
(write_archive): Likewise, but use output_bfd, not output_file.
* arsup.c: Include libiberty.h. Call xexit rather than exit.
* bucomm.c: Likewise.
PR 2474.
(usage): Document --disassemble-all.
(long_options): Add disassemble-all as a synonym for -D.
(compare_symbols): Make pointers const.
(compare_relocs): New static function.
(disassemble_data): Rename disassemble to disassemble_fn to avoid
shadowing. If dump_reloc_info, print relocs along with
disassembly. Skip sections which are not SEC_CODE unless
disassemble_all or only is set.
(display_bfd): Don't call dump_relocs if disassemble is set.
(main): Accept and handle -D.
* binutils.texi: Document -D/--disassemble-all.
* objdump.1: Likewise.
PR 5059.
(inarch): Remove variable.
(map_over_members): Make static. Add arch argument, and use it
instead of inarch. Change all callers.
(main): Treat --version as -v. Accept -t argument. Accept any
number of archive arguments. Catch and use open_inarch return
value, rather than using inarch.
(open_inarch): Return newly opened BFD, rather than using inarch.
(do_quick_append): Make archive_filename const.
(write_archive): Add iarch argument, and use it instead of inarch.
Change all callers.
(delete_members, move_members, replace_members): Likewise.
(ranlib_only): Don't exit on success. Catch and use open_inarch
return value.
(ranlib_touch): New function.
* arsup.h (map_over_members): Don't declare.
(ar_end, ar_extract): Declare.
(open_inarch): Change return value in declaration to bfd *.
* arsup.c (map_over_list): Make static. Always pass two arguments
to function. Add arch argument, and use it instead of inarch.
Change all callers.
(ar_directory_doer): Make static. Add ignored second argument.
Change all callers.
(ar_directory): Use open_inarch return value rather than inarch.
(ar_addlib_doer): Make static.
(ar_addlib): Use open_inarch return value rather than inarch.
(ar_extract): Remove unused local variable abfd.