Commit Graph

177 Commits

Author SHA1 Message Date
David MacKenzie 7681bc7b30 * ar.c, bucomm.c, nlmconv.c, nm.c, objcopy.c, objdump.c,
size.c: Use bfd_get_error and bfd_set_error and new error names.
1994-02-17 18:10:18 +00:00
David MacKenzie 704bbd0dc3 * objcopy.c (strip_main, copy_main): Add missing 'break' in switch. 1994-02-11 23:56:49 +00:00
David MacKenzie 5d2f7e30c5 * objcopy.c (filter_bytes): Make MEMHUNK a char *, not PTR, so we
can do arithmetic on it.
1994-02-04 18:47:33 +00:00
David MacKenzie 250e36fe2d * objdump.c (dump_section_stabs, read_section_stabs,
print_section_stabs): Functions broken out of dump_stabs_1.
	Free the stabs and strings when done with them.
1994-02-03 22:21:28 +00:00
David MacKenzie 6f9dff07e1 More changes to print ambiguous matches and use the
abstracting macros.
1994-02-03 13:08:29 +00:00
David MacKenzie 0c5dc23cc9 * nlmconv.c (main): Use bfd_get_flavour instead of struct member.
* 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.
1994-02-03 01:39:10 +00:00
David MacKenzie 0c62139f90 * ar.c: Use bfd_fatal and bfd_nonfatal instead of bfd_perror and exit.
Indent.  Remove DEFUNs.
1994-02-03 00:42:37 +00:00
David MacKenzie cef35d4882 * nlmconv.c (main), objcopy.c (copy_file): Print matching formats
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.
1994-02-03 00:25:30 +00:00
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