* ar.c (print_contents, extract_file), size.c
(print_berkeley_format): Use bfd_get_filename and
bfd_my_archive instead of dereferencing the structs directly.
if ambiguous match.
* nm.c (display_file), size.c (display_bfd): Eliminate gotos.
Print matching formats if there is an ambiguous match. Use
bfd_nonfatal instead of hardcoded error message if nothing matches.
* arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of
abfd->filename.
* nm.c (display_archive): New function, from code in display_file.
(display_rel_file): Renamed from do_one_rel_file.
* size.c: Indent.
(display_archive): New function from code in display_file.
(display_file): Check bfd_close error return.
* strings.c (strings_object_file): Check bfd_check_format
error return.
* strings.c, objdump.c, size.c: Use bfd_nonfatal instead of bfd_perror.
* bucomm.c: Delete references to exit_handler. It wasn't set
anywhere, and now that we're using the libiberty xmalloc, it
wouldn't always get called before exiting.
(list_matching_formats): Function moved from objdump.c.
* bucomm.h: Declare it.
* objdump.c (disassemble_data): Move some variable decls closer to
their use. Add some comments. Replace a nested block with a
return.
(copy_section): Call it.
(copy_options, copy_usage, copy_main): Add --byte option to
activate it. Appropriate the -b option (which was an undocumented
synonym for -F) for it, also. Add --interleave, -i option for
additional control.
(setup_section, copy_section, mangle_section): Renamed with no `s'
on the end.
* objcopy.1, binutils.texi: Document the new options.
* objdump.c (display_target_tables, display_target_list):
New functions broken out of display_info.
Eliminate some magic constants. Use more meaningful variable names.
(dump_bfd_header): New function broken out of display_bfd.
(dump_section_header): New function broken out of dump_headers.
(remove_useless_symbols): Don't shadow global variable name with
parameter.
(objdump_print_address): Fix backward test.
It would never be called.
(list_matching_formats): Take an arg giving the list of matching
formats.
(display_bfd): Pass the arg, and get it filled in by calling
bfd_check_format_matches instead of bfd_check_format.
(display_info, display_info_table): target_vector was renamed to
bfd_target_vector.
It would never be called.
(list_matching_formats): Take an arg giving the list of matching
formats.
(display_bfd): Pass the arg, and get it filled in by calling
bfd_check_format_matches instead of bfd_check_format.
* binutils.texi (objdump): Note some limitations of -h section
address printing.
* mpw-build.in: New file, build script fragment for MPW make.
* mpw-make.in: New file, MPW makefile fragment for binutils.
(Normally automatically generated from Makefile.in.)
* objdump.c (stab_name): Allocate dynamically.
(stab_print): Use pointers to strings instead of char arrays.
(dump_stabs): Change alloc and init of arrays appropriately.
(dump_stabs_1): Always decide whether to print stab_name or
the stab's type number, if unnamed.
aspects of the target for each program.
* objdump.c (long_options, usage): Add long equivalents for all
remaining short options that lacked them.
* binutils.texi objdump.1: Document them.
* size.c (usage): Tweak usage message.
* size.1: Add missing `=' in examples.
* binutils.texi strip.1 objcopy.1 nlmconv.1 objcopy.c nlmconv.c:
Use "--target=bfdname" as the option to select the BFD target,
like nm and size already do.
Reserve "--format=format" for textual output selection options, but
for now keep old option names as obsolete for backward compatibility.
* strings.c (main, strings_object_file, usage): Add --target option.
* binutils.texi strings.1: Document it.
* ar.c (main): Put parens around assignment used as truth value.
* objdump.c (display_bfd): Declare return value as void.
(stab_print): Use "" instead of 0 to initialize array.
(dump_stabs_1): Print vma using printf_vma.
(display_info): Put parens around assignment used as truth value.
* strings.c (print_strings): Cast printf arguments.
(long_options): Add "debug" and "linker".
(main): Handle -d and -l arguments. Make command line input and
output files optional. Parse the command file before opening the
BFD's, which requires storing more information in local variables.
If INPUT names multiple files, link them together. Use OUTPUT for
the output file name if not named on command line.
(show_usage): Changed for new options.
(link_inputs): New function to automatically invoke linker to
handle multiple INPUT files.
(choose_temp_base_try, choose_temp_base, pexecute): New functions,
mostly copied from gcc/gcc.c.
* nlmconv.h (input_files, output_file): Declare.
* nlmheader.y (input_files, output_file): Define.
(command): Support INPUT with a string_list argument. Support
OUTPUT.
(string_list): Renamed from module_list.
* Makefile.in (nlmconv.o): Define LD_NAME based on
program_transform_name.
Fixes PR 3974.
(copy_file): Don't copy EXEC_P specially here.
This permits strip to generate an executable file on UnixWare;
it still does not actually strip the debugging information.
alignment adjustment. Clear BSF_SECTION_SYM if symbol is moved to
a different section. Use time_t for time variable.
(setup_sections): Only put sections with contents in output NLM.
(i386_mangle_relocs): No symbols are common at this point. Add
casts to avoid warnings.
(main): Set the bss vma to always follow the data section. Move
symbols into new sections, and adjust values by output_offset.
(setup_sections): Don't copy all sections, but instead point all
text sections to .text, all data sections to .data, and all bss
sections to .bss.
(copy_sections): Adjust accordingly.
* configure.in: If we have some *-*-netware* target, or are using
all targets, set BUILD_NLMCONV to $(NLMCONV_PROG) in Makefile.
* Makefile.in (PROGS): Use $(BUILD_NLMCONV) rather than
$(NLMCONV_PROG).
(dump_headers): Don't test for SEC_BALIGN if it's not defined by bfd.h.
(The latter is done with #ifdef in case it turns out SEC_BALIGN has to be
put back. I didn't *see* any uses of it besides this one, though.)
sections before looking at the symbols. Move all common symbols
into .bss section. Automatically define _edata and _end. Only
export symbols in the export list, with multiple prefixes if
necessary. Warn if no version. Always create extended header.
Set date automatically if not already set.
(setup_sections): Count size of bss sections.
(mangle_relocs, i386_mangle_relocs): Accept section argument, and
take reloc_count as a changeable pointer; changed callers.
(i386_mangle_relocs): Remove PC relative relocs within a section,
as they require no adjustment.
* nlmheader.y: Fixed memory allocation throughout: token STRING is
now allocated on the heap, and freed if not needed. Null
terminated copyright message. Accept version with only two
strings.
(symbol_list_opt): New nonterminal, either symbol_list or empty.
(symbol_list): Use left recursion to avoid overflowing parser
stack.
(yylex): Rearranged beginning of line check. Accept quoted
strings using single quotes. End generic argument at comment
character or parentheses.
(string_list_append): Fixed.
(string_list_append1): New function.
(demangle.o): New target.
(cplus-dem.o): Depend on it, to force compilation order when doing
parallel compiles.
* nm.c (print_symbol_info_{bsd,sysv,posix}): Take a bfd arg.
(struct output_fns print_symbol_info): Ditto.
(long_options, usage, main): Add -C --demangle option.
(print_symname): New function, demangling if requested.
(print_symbols, print_symbol_info_{bsd,sysv,posix}): Use it.
* Makefile.in: Put CFLAGS last in compilation rules and omit from
linking rules. Use ARCHDEFS to compile objdump.c.
Update dependencies.
* configure.in: Construct ARCHDEFS based on the BFD target makefile
fragments.
* objdump.c: Conditionalize calls to the print_insn_ARCH functions
according to ARCHDEFS.
(bsssize, datasize, textsize): New global variables.
(bss_section_name, data_section_name, text_section_name): Removed.
(print_berkeley_format): Map berkeley_sum over all the sections,
rather than only reporting sizes of specifically named sections.
* Makefile.in ($(OBJDUMP_PROG)): Removed dependency on size.o.
* nlmconv.c, nlmconv.h, nlmheader.y: New files for program to
convert object files into NetWare Loadable Modules.
* Makefile.in (NLMCONV_PROG): New macro, define to be nlmconv.
(PROGS): Add NLMCONV_PROG.
(nlmheader.c, nlmheader.o, nlmconv.o, $(NLMCONV_PROG)): New
targets.
(cplus-dem.o): Link c++filt with version.o.
* strings.c: Include bucomm.h and add prototypes to other decls.
Remove -h option.
* bucomm.h: Declare xrealloc.
* nm.c, objcopy.c, objdump.c, size.c, strings.c (main, usage): Add
--help option. Put "GNU" in the version message.
(usage): Take stream and exit status as args.
(main): Pass new args to usage.
* objdump.c (remove_useless_symbols): New function.
* objdump.c (comp): Simplify.
* objdump.c (dis-assemble_data): Make simpler and more
efficient how we filter out useless symbols: Just filter
BEFORE the sort (using remove_useless_symbols).
* objdump.c (objdump_print_address): Simplify.
Change output syntax to match gdb.
Currently assumes that the only relevant sections are named .text,
.data and either .bss or .stack. This is not very general, and it
doesn't work for ECOFF.
$(tooldir)/bin; needed for building libgcc.a.
* objdump.c (objdump_print_address): Fix the check
"coincidental" label matches by dis-allowing undefined
or com symbols.
(using nm) a file with the variable prepends_underscore.
* Makefile.in (c++filt): Link underscore.o with cplus-dem.o
so that initial underscores get removed iff appropriate.
* binutils.texi: Preliminary documentation for c++filt.
* Makefile.in, binutils.texi: Set to version 2.2.
* i386-pinsn.c: Removed. Subsumed by ../opcodes/i386-dis.c.
* Makefile.in: Adjust accordingly.
* objdump.c: Support new-style disassemblers (ones that use
the interface of ../include/dis-asm.h).
Migrated dejagnu testcases and support files for testing nm to
binutils/testsuite from deja-gnu. These files were moved "as is"
with no modifications. This migration is part of a major overhaul
of dejagnu. The modifications to these testcases, etc., which
will allow them to work with the new version of dejagnu will be
made in a future update.
* Makefile.in (LIBIBERTY): Use LIBIBERTY_BIN_DIR.
* Makefile.in (DEMANGLER_PROG): New program to build. Add macro
and rule.
* Makefile.in (PROGS): Add DEMANGLER_PROG.
* Makefile.in (distclean): Remove sysdep.h.
* size.c: Use %u format where appropriate.
* objdump.c: Standardize: L_SET -> SEEK_SET.
* objdump.c: Use new macro bfd_asymbol_bfd.
* configure.in: Allow std-host as the default ${mys_host}.
* size.c: Use bfd_size_type (and long) where appropriate.
* ar.c: Make writing a map the default, to be compatible
with SYSV and Posix.2. Remove some bogus kludges that
handled __.SYMDEF directly.
* NEWS: New file.
* arsup.h, bucomm.h, objdump.h: Remove EXFUN from binutils.
It still remains as a local macro in gmalloc.c, which is derived
from some other copy of GNU Malloc somewhere (FIXME).
* ar.c, objdump.c, size.c: Replace EXFUN with PROTO. Make static
fns really static.
* arsup.h: Declare extract_files.
Add long option names. Re-think option letters to be more
consistent.
* copy.c: New function filter_symbols() for stripping only
debug-symbols and/or local symbols. Use these to support
the previously-missing options of the old FSF strip.
Mon Sep 21 14:39:56 1992 Ian Lance Taylor (ian@cygnus.com)
* m68k-pinsn (print_insn_arg, fetch_arg): added support for
operands to memory management instructions, from WRS.
Tue Aug 18 13:28:44 1992 Ian Lance Taylor (ian@cygnus.com)
* config/mh-apollo68v: removed -g from CC definition.
* Makefile.in: always create installation directories.
program), follow traditional argv processing:
'strip file1 file2' now strips file1 and file2, rather
than stripping file1 (as input), leaving output in file2.
mostly thanks to Gumby suggestions:
1: move copyright/copying explanation up before top node as usual for
info files
2: coalesce main menu and descriptive list of binutils
3: point directly into separate ld info file from binutils main menu