Commit Graph

219 Commits

Author SHA1 Message Date
Stan Shebs 334d6e7603 Mon Jan 31 18:50:41 1994 Stan Shebs (shebs@andros.cygnus.com)
* objdump.c (display_target_list, display_info_table): Check that
	the bfd of the dummy output file is not null.
1994-02-01 02:52:22 +00:00
David MacKenzie f7b839f7cd * objcopy.c (filter_bytes): New function.
(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.
1994-01-26 22:11:18 +00:00
Stan Shebs 0886e098c5 Tue Jan 25 19:40:54 1994 Stan Shebs (shebs@andros.cygnus.com)
* bucomm.c (print_arelt_descr): Change decl of `when' to time_t.
	* objdump.h: Removed.
1994-01-26 03:45:21 +00:00
David MacKenzie abdcac0f52 * objdump.c (display_file): Remove call to list_matching_formats.
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.
1994-01-25 13:27:56 +00:00
David MacKenzie 209e561041 * objdump.c (display_file): Remove call to list_matching_formats.
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.
1994-01-24 23:38:03 +00:00
David MacKenzie db2e6adb5b * binutils.texi (objdump): Note some limitations of -h section
address printing.
1994-01-24 21:31:01 +00:00
Stan Shebs 3785367375 Minor MPW compatibility tweaks. 1994-01-23 00:31:14 +00:00
David MacKenzie eae821453c * objdump.c (list_matching_formats): If the file format is ambiguous,
print the matching names so the user can choose one.
	(display_bfd): Call it.
	(display_file): Call it.
1994-01-22 05:11:40 +00:00
Ian Lance Taylor 722087ec13 * objdump.c (disassemble_data): Support bfd_arch_rs6000. 1994-01-22 00:19:02 +00:00
Stan Shebs fe2750e101 Mon Jan 17 13:57:25 1994 Stan Shebs (shebs@andros.cygnus.com)
* 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.
1994-01-17 22:03:42 +00:00
Ian Lance Taylor 46050fe4d0 * objcopy.c (strip_main, copy_main): Don't clobber the input file
if copy_file fails.
1994-01-14 21:44:44 +00:00
Ian Lance Taylor 1edb7335e6 * nlmconv.c (main): Warn about an attempt to use a shared library
with uninitialized data.
1994-01-14 20:58:43 +00:00
Ian Lance Taylor e70f2bde6f * nlmconv.c (setup_sections): Make sure that we align the
output_offset of each input section appropriately.
1994-01-14 19:55:42 +00:00
Ian Lance Taylor 02a68547b9 * objdump.c (dump_relocs): Don't crash if section name is NULL. 1994-01-13 22:34:51 +00:00
Ken Raeburn 096aefc040 * bucomm.c (xmalloc, xrealloc): Deleted.
* bucomm.h (xmalloc, xrealloc): Prototypes fixed to correspond to libiberty
versions.
1994-01-09 20:37:30 +00:00
David MacKenzie eae0423857 * binutils.texi: Add a chapter summarizing the ways to select
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.
1994-01-06 19:49:06 +00:00
Ian Lance Taylor 9ef23d71b3 Various entries. 1993-12-23 17:29:32 +00:00
Ian Lance Taylor 6972011b96 * nlmheader.y (command): Accept MAP and FULLMAP without arguments.
* nlmconv.c (main): Change error message for MAP and FULLMAP.
1993-12-10 19:29:10 +00:00
Ian Lance Taylor 4e58b3ebfc * nlmconv.c (main): Warn about imported symbols that are not in
the IMPORT list even if the IMPORT keyword is not used.

Fixes PR 4006.
1993-12-10 05:51:25 +00:00
Ian Lance Taylor 0f6df2eee0 * nlmconv.c (debug, unlink_on_exit): New static variables.
(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.
1993-12-10 05:33:49 +00:00
Ian Lance Taylor 627703f982 * nlmheader.y (nlmheader_identify): New function. Use it to print
the program name just once, instead of with every error message.

Fixes PR 3973.
1993-12-08 18:10:11 +00:00
Ian Lance Taylor 419093bc9c * nlmconv.c (long_options): Changed --header-info to --header-file
to match documentation and usage message.
1993-12-06 21:12:48 +00:00
Jeff Law e2767a0115 * objdump.c (dump_relocs): Avoid dereferencing a NULL sym_ptr_ptr
in a relocation.
1993-12-05 09:32:06 +00:00
Ian Lance Taylor 3fa2ae535b Remove unused declaration from nlmconv.c. Add ChangeLog entry for
Sean's change.
1993-12-02 01:05:45 +00:00
Ian Lance Taylor 94333f2739 * Makefile.in: Use CFLAGS as well as LDFLAGS when linking. 1993-11-17 17:05:33 +00:00
David MacKenzie 80f31fbb6a fix typo 1993-11-17 12:52:07 +00:00
Jeff Law cca528fa66 * objdump.c (dump_stabs): Handle stabs-in-som as implemented
by the new BFD SOM assembler.
1993-11-14 08:29:27 +00:00
David MacKenzie 938fa52b82 fix NAME hyphen 1993-11-13 15:16:23 +00:00
Ian Lance Taylor ea5a60a1ea * nlmconv.c (i386_mangle_relocs): Adjust reloc address by
section output_offset.
1993-11-09 20:23:47 +00:00
Jeffrey Wheat 51b7bf87a0 Rename RUNTESTFLAGS to RUNTEST_FLAGS 1993-11-04 16:08:03 +00:00
David MacKenzie d6f8ba7eb5 objcopy.c (S_ISLNK): Define as 0 if there is no S_IFLNK. 1993-11-02 21:35:21 +00:00
David MacKenzie 53a3e5b566 use xmalloc instead of malloc 1993-10-29 23:13:10 +00:00
Stan Shebs e1ec9f078f Rename a variable that conflicts with Lynx 1993-10-29 18:15:01 +00:00
Stan Shebs 4ecf13a85b * ar.c (main): Always create the archive when quick appending,
even if no input files have been given.
1993-10-29 02:48:19 +00:00
Ian Lance Taylor 6a6d38c8d0 * nlmconv.c (main): Set sharedDebugRecordOffset and
sharedDebugRecordCount fields in extended header.
1993-10-27 16:21:14 +00:00
Ian Lance Taylor 90d8edfdf3 * nlmconv.c (main): Force moduleName field to upper case. 1993-10-27 16:06:56 +00:00
Ian Lance Taylor 8cfa495040 * objcopy.c (main): Give a usage message if there are too many
arguments.
1993-10-25 20:52:07 +00:00
Ken Raeburn ca0a2b2df1 * Makefile.in (install-info): Rewrite to take advantage of VPATH, so FSF
distributions (with info files in $(srcdir)) install properly.
(DISTSTUFF): Build nlmheader.c too.
1993-10-25 17:38:20 +00:00
Mark Eichin 9ca0105226 note change to fprintf declaration 1993-10-22 18:15:53 +00:00
Roland Pesch 650a49f055 Makefile.in (binutils.dvi): use TEXIDIR to find texinfo.tex
binutils.texi (ar): improve synopsis lines
              (strings): fix overfull box in synopsis
              (passim) remove some contractions
1993-10-01 00:11:58 +00:00
Ian Lance Taylor 9b018ecd1b * objdump.c (usage): Mention --stabs. 1993-09-23 05:21:21 +00:00
Ian Lance Taylor c0367ba580 * objcopy.c (copy_object): Copy all applicable file flags.
(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.
1993-09-23 05:08:21 +00:00
Ian Lance Taylor b342eba6cd * nlmconv.c (main): Adjust data section size to correspond to bss
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.
1993-09-20 23:31:57 +00:00
David MacKenzie 941ffd1960 * Makefile.in (install): Don't put strings in tooldir/bin. 1993-09-10 15:13:05 +00:00
Ian Lance Taylor d5808c7cd8 * nlmconv.c (total_bss_size): Removed.
(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.
1993-09-06 19:42:12 +00:00
Ian Lance Taylor a6762b1069 Only build nlmconv if configured for a NetWare target.
* 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).
1993-09-02 16:36:36 +00:00
Ken Raeburn 195d1adff1 * objdump.c (ARCH_all): Define ARCH_hppa too.
(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.)
1993-08-31 18:15:50 +00:00
Ian Lance Taylor ef5b53687b * nlmconv.c (main): Force creation of .bss section. Set up the
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.
1993-08-31 17:47:58 +00:00
Ian Lance Taylor ee0af83fbe * ar.c: Removed obsolete and non-functional GNU960 code. 1993-08-12 15:27:38 +00:00
Ian Lance Taylor 29078b295d * size.c (berkeley_sum): New function.
(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.
1993-08-11 20:14:37 +00:00
David MacKenzie c2b781a26e make failure nonfatal 1993-08-05 00:20:27 +00:00
David MacKenzie 68dd529571 add nm -B 1993-08-02 18:41:14 +00:00
David MacKenzie de793e5f22 posix.2 final changes 1993-07-17 01:10:10 +00:00
David MacKenzie a2cdf246df remove /dev/null kludge 1993-07-16 22:24:10 +00:00
Ian Lance Taylor b3a2b4975f * objdump.c (disassemble_data): Handle the m88k.
(display_bfd): Use bfd_errmsg, rather than just claiming that the
	bfd is not an object file.
1993-07-15 16:46:50 +00:00
K. Richard Pixley 7d8d708459 * Makefile.in (TAGS): make work again by naming directories
explicitly rather than depending on undefined macros.
	  (INSTALL_XFORM): correct bad install target.
1993-07-13 00:57:27 +00:00
David MacKenzie 2470e6fa6f * Doc fixes. 1993-07-03 00:01:44 +00:00
David MacKenzie 4f15fb276d * Makefile.in: Add rules for strings. 1993-06-26 06:38:57 +00:00
David MacKenzie ba7c8e2905 * strings.c, strings.1: New files.
* binutils.texi: Document strings.
1993-06-26 06:37:17 +00:00
Ken Raeburn d086adf85a Elf bfd routines and types are now size-independent again. 1993-06-26 00:47:23 +00:00
Per Bothner 3ae36cb686 * objdump.c (syms2): Removed unused variable.
* 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.
1993-06-18 21:37:21 +00:00
David D. Zuhn c8fee4a53e canonicalize install.sh location 1993-06-18 00:35:08 +00:00
David D. Zuhn 238aa238e2 * Makefile.in (install, install-info): remove parentdir support,
use INSTALL_XFORM; define INSTALL_XFORM
1993-06-16 00:45:43 +00:00
Per Bothner f63e502ba1 * objcopy.c (copy_object): Fix bad size passed to xmalloc(). 1993-06-11 00:34:26 +00:00
Ken Raeburn d34c55c6e1 hack backquoted command in Makefile.in to always have zero exit status 1993-06-03 18:16:02 +00:00
Jeffrey Osier 3ac620d408 * Makefile.in: added c++filt and objcopy to MANPAGES variable
* .Sanitize:  keep c++filt.1 and objcopy.1
1993-06-03 17:44:34 +00:00
David D. Zuhn 5a07035505 rename LOADLIBES to EXTRALIBS 1993-06-03 07:34:15 +00:00
Jeffrey Osier 08ad992164 * c++filt.1, objcopy.1: new man pages 1993-06-03 01:31:51 +00:00
Jeffrey Osier 6c69b6bde1 * biutils.texi: revised c++filt chapter 1993-05-28 00:00:59 +00:00
Ian Lance Taylor 4447efa217 * Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS. 1993-05-27 00:28:16 +00:00
Ken Raeburn 875607cb0d elf32 updates 1993-05-25 20:39:21 +00:00
Ken Raeburn f50af42bbf Makefile.in (DISTSTUFF): Don't build binutils.mm.
objdump.c (slurp_symtab): Print warning for bad symbol table.
1993-05-25 04:28:56 +00:00
David MacKenzie 386803c0be Improve error messages. 1993-05-21 19:39:15 +00:00
Per Bothner 20e54bf2c2 * NEWS: Mention copy->objcopy renaming and new c++filt program. 1993-05-14 18:13:52 +00:00
Ian Lance Taylor df14d9573c * objcopy.c: Renamed from copy.c, updated comments accordingly.
* Makefile.in, binutils.texi: Renamed copy to objcopy.
	* is-strip.c, maybe-strip.c, not-strip.c: Updated comments for
	rename of copy to objcopy.
1993-05-12 19:08:53 +00:00
Ian Lance Taylor 9fd2cc00be * Makefile.in (RUNTEST): Define.
(FLAGS_TO_PASS): Pass down RUNTEST.
1993-05-07 20:58:26 +00:00
Per Bothner f6dddd4e1d * Makefile.in: Change definition of $(tooldir) to match FSF. 1993-05-04 02:12:50 +00:00
Rob Savoye 39287eb73f * Makefile.in: Added FLAGS_TO_PASS so tests get run on freshly
built binaries if they exist. (otherwise the path)
1993-04-19 21:08:32 +00:00
Ian Lance Taylor 545a27683e Please don't add declarations of random system functions to general
source files if you can possibly avoid it.  They inevitably fail on
some system somewhere.

	* objdump.c: Removed useless fprintf declaration.
1993-04-09 18:22:57 +00:00
Rob Savoye 3e7f73db77 * Makefile.in: Changed check target to use DejaGnu. 1993-04-08 05:23:39 +00:00
Jim Kingdon f7ed13c7d5 merge binutils and gdb sparc disassemblers 1993-04-01 16:56:06 +00:00
Jim Kingdon 5d0734a7d7 provide a new interface (using read_memory_func) to call the disassemblers
which copes with errors in a plausible way
1993-03-31 21:43:25 +00:00
Ken Raeburn 12da177528 objdump.c: Use correct prototype of fprintf, else it won't compile on ANSI
C systems.
1993-03-29 13:22:16 +00:00
Steve Chamberlain 9d19b85b6a add h8500 1993-03-19 22:41:15 +00:00
Jim Kingdon 452b40b631 mention long options in usage message 1993-03-19 18:58:10 +00:00
Per Bothner 229c82cb94 * nm.c: Modify behavior of -o flag for archives to match
BSD4.4 and Sunos 4:  Prefix archive name before each line.
1993-03-19 01:56:10 +00:00
Per Bothner 2e8adbd7f4 * m68k-pinsn.c: Removed. Subsumed by ../opcodes/m68k-dis.c.
* 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).
1993-03-19 00:12:50 +00:00
Per Bothner 3048fb38f0 * ardup.c: Add extern declaration of strdup.
* Makefile.in (testsuite):  Add 'else true' since otherwise
	Ultrix /bin/sh complains.
1993-02-25 23:59:10 +00:00
Per Bothner eba174cea6 * Makefile.in: Set VERSION to 2.1.
* README, NEWS: Updates.
	* nm.c:  Add -v as a synonym for -V.
1993-02-25 03:48:13 +00:00
Mike Werner 4f8b1219bf * configure.in: added testsuite to configdirs.
* Makefile.in: added support for building testsuite.
1993-02-24 03:02:37 +00:00
Per Bothner 7721e5b345 * objdump.c (disassemble_data): Print function names when
given by bfd_find_nearest_line.  If not - still print
	line numbers.
1993-02-23 07:00:32 +00:00
Mike Werner 0545aa1ae9 * binutils/testsuite: made modifications to testcases, etc., to allow
them to work properly  given the reorganization of deja-gnu and the
	relocation of the testcases from deja-gnu to a "tool" subdirectory.
1993-02-22 16:12:45 +00:00
Ken Raeburn d9971b8304 from minyard@bnr.ca: free up copy of section contents each time through loop 1993-02-22 15:31:30 +00:00
Mike Werner 2614a439a8 * binutils/testsuite: Initial creation of binutils/testsuite.
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.
1993-02-21 19:34:51 +00:00
Fred Fish c921e2aa7b * Makefile.in (LIBIBERTY_SRC_DIR, LIBIBERTY_BIN_DIR): New macros.
* 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.
1993-02-12 18:08:35 +00:00
Per Bothner fc561ccda8 * arsup.h (interactive), bucomm.h (program_name): Prefix
with 'extern', to avoid warnings from some compilers.
1993-01-06 23:19:45 +00:00
Steve Chamberlain dc5dcabb9b >
* arparse.y: fix unnecessary shift/reduce
1993-01-06 23:16:17 +00:00
Per Bothner eeece52d14 * Makefile.in: Make check depend on all.
* 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}.
1992-12-22 23:52:26 +00:00
Per Bothner e2fe2df4d3 * Makefile.in (dist): Fix permissions before release.
* 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.
1992-12-16 02:13:17 +00:00
David D. Zuhn b19753b911 include file handling changes 1992-11-08 00:01:46 +00:00