Commit Graph

717 Commits

Author SHA1 Message Date
Jim Wilson
f0eebb5f6a * Makefile.in (srconv.o): Add dependence on sysroff.c. 1994-10-10 01:06:20 +00:00
Ian Lance Taylor
70605a77d0 * configure.in (configdirs): Change binutils.all to binutils-all. 1994-09-30 03:49:54 +00:00
Ian Lance Taylor
7f23bcab2c * VMS does not permits `.' in directory names. Renamed
binutils.all to binutils-all.
1994-09-29 16:46:53 +00:00
Ian Lance Taylor
3bbea7af28 * Makefile.in (arparse.c): Don't ignore errors from mv.
(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.
1994-09-28 19:53:22 +00:00
Ian Lance Taylor
98e9482ab5 * configure.in: Use mt-m68k for m68k*-*-aout* and m68k*-*-coff*,
not for m68k-*-*.
1994-09-28 17:07:26 +00:00
Ian Lance Taylor
aa39dc49cb * objdump.c (disassemble_data): Pass the reloc buffer to free, not
the pointer used to loop over the relocs.
1994-09-28 17:06:41 +00:00
Ian Lance Taylor
2d0546410d * objdump.c (objdump_print_address): If we can't find a smaller
symbol in the right section, look for a larger one.
1994-09-16 16:33:18 +00:00
Ian Lance Taylor
8b129785e4 * objdump.c (struct objdump_disasm_info): Add field require_sec.
(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.
1994-09-16 15:30:38 +00:00
Ian Lance Taylor
4b4e568a4c * ar.c: Call xexit rather than exit.
(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.
1994-09-16 04:03:23 +00:00
Ian Lance Taylor
d5464baad0 * objdump.c (disassemble_all): New global variable.
(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.
1994-09-16 01:59:30 +00:00
Ian Lance Taylor
e4798f4093 * objdump.c (disassemble_data): Initialize prevline to 0. Make
prev_function non const.  Copy functionname into an malloc buffer
	when setting prev_function, instead of assuming that the string
	will last forever.
1994-09-14 20:21:21 +00:00
Ian Lance Taylor
1896790ef9 * nm.c: Include libiberty.h.
(sort_by_size): New static variable.
	(long_options): Add --size-sort.
	(usage): Mention --size-sort.
	(numeric_forward): Make static.  Change from void * to PTR.
	(numeric_reverse): Likewise.
	(non_numeric_forward, non_numeric_reverse): Likewise.
	(sorters): Change declaration from void * to PTR.
	(size_forward, sort_symbol_by_size): New static functions.
	(display_rel_file): Handle sort_by_size.
	(filter_symbols): If sort_by_size, discard absolute and undefined
	symbols.
	* binutils.texi (nm): Document --size-sort.
	* nm.1: Document --size-sort.
PR 3611.
1994-09-14 16:28:41 +00:00
Jeff Law
a0f5033df3 * objcopy.c (copy_main): Initialize input_filename and
output_filename to NULL.
1994-09-14 03:08:55 +00:00
Ian Lance Taylor
5e39c98765 * Makefile.in (version.o): Depend upon Makefile, so that version.o
gets rebuilt when make variable VERSION is changed.
1994-09-13 18:19:24 +00:00
Ian Lance Taylor
28d1b01e43 * objdump.c (dump_section_header): Print the SEC_NEVER_LOAD flag. 1994-09-13 18:18:01 +00:00
Ian Lance Taylor
9b6cf6b6b1 * config/unix.exp: If nm.new does not exist, use [transform nm].
* config/default.exp: Likewise.
1994-09-02 16:55:54 +00:00
Ken Raeburn
1fde209cc1 rewrite sanitize lines so as not to confuse bsd make 1994-08-30 19:45:05 +00:00
Ian Lance Taylor
c730978489 * configure.in, binutils.all/configure.in: Change i386 to
i[345]86.
1994-08-24 16:43:54 +00:00
Ian Lance Taylor
02354a0f8d * ar.c: Include libiberty.h.
(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.
1994-08-22 21:14:43 +00:00
Ian Lance Taylor
0aca460e7c Add support for removing named sections to objcopy and strip.
* objcopy.c (struct section_list): Define.
	(remove_sections): New static variable.
	(strip_options, copy_options): Add remove-section.
	(copy_usage, strip_usage): Mention -R and --remove-section.
	(setup_section): If section is in remove_sections list, ignore it.
	(copy_section): Likewise.
	(strip_main, copy_main): Handle -R.
	* binutils.texi, objcopy.1, strip.1: Document new options.
1994-08-11 19:00:26 +00:00
Stan Shebs
8ea882c6df * nlmconv.c (powerpc_mangle_relocs): Rename symvalue to sym_value,
so as not to conflict with the symvalue typedef in bfd.h.
1994-08-10 17:24:10 +00:00
Jean Marie Diaz
6d2ec583d0 * nlmheader.y: Per current NetWare docs, accept a revision number
of 0 and treat a revision number greater than 26 as 0.
1994-08-01 23:25:53 +00:00
Ian Lance Taylor
ca6c1a2217 * objdump.c (objdump_print_address): Correct handling of end of
symbols when looking for next symbol with a different value.
1994-07-25 17:01:10 +00:00
Ken Raeburn
d3bba67b52 * nm.c (numeric_forward): Treat undefined symbols as "less than" defined
symbols with zero values.  If numeric values are equal, or both symbols are
undefined, sort alphabetically.  Don't assume that the difference of two
bfd_vma values will truncate to "int" and still have the same sign.
(numeric_reverse): Call numeric_forward and negate the result.
(print_symbol_info_bsd): For undefined symbols, print leading spaces equivalent
to the width of a printed bfd_vma, rather than assuming that 8 will look right.
1994-07-22 20:56:31 +00:00
Ian Lance Taylor
d672b1bf3d * config/mh-alphaosf, config/mh-apollo68v, config/mh-delta88:
Remove; obsolete.
1994-07-21 14:27:45 +00:00
Bill Cox
334bf283ab * config/mt-mips-ecoff: Add -Tidp.ld option. 1994-07-19 22:25:03 +00:00
Ian Lance Taylor
81794792b7 * objdump.c (slurp_dynamic_symtab): Try to get the dynamic symbols
even if the bfd is not marked DYNAMIC.  ELF executables are not
	marked DYNAMIC, but do have dynamic symbols.
1994-07-17 02:36:11 +00:00
Steve Chamberlain
4725d7ae1f * coffgrok.c (do_where): Make data with no type 'int'.
(do_define):  Keep info on source file of a symbol.
	* coffgrok.h (coff_symbol): New field.
	* srconv.c (PROGRAM_VERSION): Now 1.3
	(wr_rl): Use external ref number for symbol.
	(wr_dus): Only keep one source file per debug unit.
	(wr_dln): Always emit line numbers for first source file,
	(wr_globals):  Emit globals in the du of their owning source file.
1994-07-15 08:51:49 +00:00
J.T. Conklin
ee5f246092 * nlmheader.y: Null terminate var_hdr->threadName. 1994-07-11 23:06:35 +00:00
Ken Raeburn
a2869e63cd Makefile.in (syslex.o, sysinfo.o): Permit C source files to be in $(srcdir), as
they will be for FSF releases.
1994-07-11 18:22:19 +00:00
Ian Lance Taylor
33315bcabe * objcopy.c: Include libiberty.h.
(copy_file): If output_target is NULL, set it to the target of the
	input file.
1994-07-05 20:17:37 +00:00
Stan Shebs
6153f5bb58 * mpw-config.in: New file, MPW configure fragment for binutils.
* mpw-make.in (install-only): New target.
	(install): Also depend on install-only.
1994-06-28 02:20:40 +00:00
Stan Shebs
066f301d5d Remove more GM-specific stuff 1994-06-28 02:16:18 +00:00
David MacKenzie
1f8b3b5746 Change --with-targets to --enable-targets, per GNU coding standards. 1994-06-23 20:08:57 +00:00
Ian Lance Taylor
e1495000e7 * nlmconv.c (powerpc_build_stubs): Don't generate the PowerPC
NetWare custom header; no longer needed.
	(powerpc_mangle_relocs): Convert relocs against the uninitialized
	data section into relocs against the data section.
1994-06-21 21:21:05 +00:00
Ian Lance Taylor
9d11577a58 * configure.in: Set nlmconv_defs to -DNLMCONV_cputype for all the
netware targets.  Write it into Makefile as NLMCONV_DEFS.
	* Makefile.in (nlmconv.o): Pass $(NLMCONV_DEFS) to $(CC).
	* nlmconv.c: Only compile code for specific CPU types if
	NLMCONV_cputype is defined.
1994-06-21 17:50:33 +00:00
Ian Lance Taylor
a18ff4a730 * nlmconv.c (main): Change uses of bfd_abs_section, etc., to use
bfd_abs_section_ptr or bfd_is_abs_section, etc.
	(i386_mangle_relocs, alpha_mangle_relocs): Likewise.
	(powerpc_build_stubs): Likewise.
	* nm.c (filter_symbols, print_symbols): Likewise.
	* objcopy.c (filter_symbols): Likewise.
	(mark_symbols_used_in_relocations): Likewise.
	* objdump.c (remove_useless_symbols, dump_relocs): Likewise.
	* size.c (sysv_internal_printer): Likewise.
1994-06-21 17:20:20 +00:00
Ken Raeburn
1cf8bd3f31 * Makefile.in (MANPAGES): Remove $(DEMANGLER_PROG).
(install): Install it explicitly, from build dir, not srcdir.
1994-06-20 20:44:46 +00:00
Ian Lance Taylor
d5671c53d4 * objdump.c: Don't include elf/internal.h.
(bfd_elf_find_section): Don't declare.
	(read_section_stabs): No special handling for ELF.  Always read
	using BFD sections.
1994-06-20 20:31:46 +00:00
Ian Lance Taylor
6f88f03122 * configure.in: Set UNDERSCORE in Makefile based on result of
invoking config.bfd with a second argument of ``_''.
	* Makefile.in (underscore.c): Depend upon Makefile.  Don't try to
	run $(CC) and $(NM), just use $(UNDERSCORE).  Create via temporary
	file.
	(demangle.o): Remove target.
	($(NM_PROG)): Don't depend upon demangle.o, and	don't link against
	demangle.o.  It's in libiberty anyhow.
	(cplus-dem.o): Don't depend upon demangle.o.
	* binutils.texi: Mention -n and --no-strip-underscores arguments
	to c++filt.
1994-06-16 21:59:41 +00:00
Ian Lance Taylor
9eb39bca51 * nm.c (long_options): Add --no-demangle to turn off --demangle,
and --no-cplus for Linux compatibility.
	(usage): Mention --no-demangle.
	* binutils.texi: Document --no-demangle.
1994-06-15 16:13:59 +00:00
Ian Lance Taylor
8291be48a9 * nm.c: HOST_64_BIT was renamed to BFD_HOST_64_BIT. 1994-06-10 21:14:49 +00:00
Ian Lance Taylor
90f6517da9 * objcopy.c (copy_archive): Make the temporary directory in the
same directory as the output BFD, since we may not have write
	permission on the current directory.  Set the permissions of the
	new directory to 0700, not 0777.
1994-06-10 19:43:49 +00:00
David Henkel-Wallace
b5775df3dc rs6k lynx changes 1994-06-08 05:05:21 +00:00
Jeffrey Osier
7e5e961977 binutils.texi: (objdump) fix formatting in options summary 1994-06-03 22:50:50 +00:00
Ken Raeburn
c6474837be note renaming 1994-06-03 21:36:26 +00:00
Ken Raeburn
faa70c3553 actually do c++filt.1 -> cxxfilt.man renaming on trunk... 1994-06-03 21:35:55 +00:00
Ian Lance Taylor
105da05c1a * objdump.c (display_target_list): Remove unused local ok. 1994-06-03 15:00:55 +00:00
Ken Raeburn
c06e55d99a changes from gas-2.3/binutils-2.4 dist (details in branch log msgs, changelogs) 1994-05-27 16:58:05 +00:00
Ian Lance Taylor
d5e29b6090 Remove sanitization of PowerPC NetWare. 1994-05-20 18:09:48 +00:00
Bill Cox
087188e0df * config/default.exp, config/unix.exp: Replace error
proc calls with perror.
1994-05-17 21:06:39 +00:00
Ian Lance Taylor
1a5b12f719 * bucomm.c: Check ANSI_PROTOTYPES rather than __STDC__. 1994-05-14 03:26:26 +00:00
Jason Molenda
6f9077cdc1 Tue May 10 18:22:06 1994 Jason Molenda (crash@sendai.cygnus.com)
* objcopy.c (copy_section): Set section size correctly if using
        interleave.
1994-05-11 01:28:18 +00:00
Stan Shebs
39a20ec677 Tue May 10 11:20:54 1994 Stan Shebs (shebs@andros.cygnus.com)
* configure.in (sparclite): Match on sparclite*-*-*.
1994-05-10 18:26:39 +00:00
David Henkel-Wallace
2a38983c8d various changes for lynx.rs, ericsson, BNR. 1994-05-07 00:34:19 +00:00
Ken Raeburn
5e54009453 syslex.l, objdump.c/config changes 1994-05-05 22:53:04 +00:00
Ken Raeburn
c063fc4558 * Makefile.in (objdump.o): Deleted special rule.
* configure.in: Don't bother building ARCHDEFS variable for Makefile.
* objdump.c (ARCH_*): Deleted handling.
(disassemble_data): Call `disassembler' from opcodes library.
1994-05-05 22:52:31 +00:00
Ken Raeburn
6bd7601ee1 (yywrap): Define as function if not defined as a macro. 1994-05-05 22:51:27 +00:00
Ian Lance Taylor
dd270b5ce5 Remove obsolete files. Add mt-slite to .Sanitize. 1994-05-03 00:15:24 +00:00
Steve Chamberlain
932315388d lint. 1994-04-29 16:51:18 +00:00
Steve Chamberlain
7bf6856e9c * Makefile.in (syslex, sysinfo): Use CC_FOR_BUILD.
* coffdump.c, coffgroc.c, coffgrog.h, srconv.c, sysdump.c,
	sysroff.info: Major changes.
1994-04-27 18:27:18 +00:00
Stan Shebs
22111f0eb2 Tue Apr 26 18:18:24 1994 Stan Shebs (shebs@andros.cygnus.com)
* objdump.c (print_section_stabs): Indicate the stab header symbol
	more clearly, print numbers of unrecognized stab n_type values.
1994-04-27 01:21:56 +00:00
Stan Shebs
89451c928b Tue Apr 26 18:10:40 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-xconfig.in (archname): Only set ARCH_mips if targeting Mips.
1994-04-27 01:17:25 +00:00
Ian Lance Taylor
88d8ae09ff * Makefile.in (distclean): Remove $(PROGS) and underscore.c. 1994-04-25 20:15:04 +00:00
Ian Lance Taylor
f645a4bf38 * nlmconv.c (setup_sections): Remove special handling of .reginfo
section.
	(copy_sections): Likewise.
	(alpha_mangle_relocs): Use bfd_ecoff_get_gp_value rather than the
	special ECOFF .reginfo section.
1994-04-22 22:13:23 +00:00
Ian Lance Taylor
45f82cf72a * objcopy.c (copy_object): Call bfd_copy_private_bfd_data after
copying everything else, to let it fiddle with the file in its
	final state.
1994-04-22 20:27:30 +00:00
Ian Lance Taylor
a963bfc888 * objdump.c: Include libiberty.h.
(display_target_list): If a format fails, just go on to the next
	one.  Check return value of bfd_set_format.
	(display_info_table): Likewise.  Don't increment loop variable in
	for loop test, since that skips the first element.
	(display_target_tables): Rewrite loop for clarity.  Ensure that it
	always prints at least one element.
1994-04-22 17:15:27 +00:00
Ian Lance Taylor
162794fe9d * nlmconv.c (main): Use CyGnUsEx rather than CyGnUsSeCs for
sections header.  Rename from cygnus_sections to cygnus_ext.
1994-04-22 15:15:42 +00:00
Ian Lance Taylor
de04bcebc0 * objdump.c (_DUMMY_NAME_): Don't define.
(display_target_list): Use tmpnam to get a file name rather than
	using _DUMMY_NAME_.  Unlink it when done.
	(display_info_table): Likewise.
1994-04-22 03:47:57 +00:00
Ian Lance Taylor
dcb210cb09 * nlmconv.c (secsec): New static variable.
(main): Create .nlmsections section in output BFD.  Store
	information about it in sections header.
	(setup_sections): Allocate space in sections header.
	(copy_sections): Copy zero sized sections.  Put information about
	each section in the sections header.
1994-04-21 16:15:00 +00:00
Ian Lance Taylor
a95abbb3ec PowerPC NetWare changes. 1994-04-20 18:49:18 +00:00
Ian Lance Taylor
c59fa195b8 start-sanitize-powerpc-netware
* nlmconv.c (powerpc_build_stubs): Take new outbfd argument.
	Change caller.  Create custom header for new PowerPC NetWare
	format.
end-sanitize-powerpc-netware

	* Makefile.in (nlmheader.o, nlmconv.o): Update dependencies.
	* nlmconv.c: Include bfd.h and libiberty.h with "", not <>.
	* nlmheader.y: Include bfd.h with "", not <>.
1994-04-20 18:37:13 +00:00
Ken Raeburn
166d299379 Make tests work again on alpha-osf1 and sun4 native.
* config/unix.exp: Use nm.new, not nm, from newly built tree.

	* binutils.all/objdump.exp: Add more wildcards to list of
	single-letter options in pattern for usage message.

	* binutils.all/nm.exp: Deleted debug-symbols test, since it only
	works for a.out/stabs systems.  Fixed regexps to make underscores
	optional, since some C compilers don't prepend them.  Deleted
	check for foo.o symbol, since again some systems don't generate
	it.
1994-04-13 22:46:00 +00:00
Ian Lance Taylor
ebc9eebab0 * objdump.c: Do an ifdef on __GO32__, not unix. 1994-04-13 14:54:18 +00:00
Bill Cox
099c286e74 * Makefile.in (check): Set TCL_LIBRARY for runtest. 1994-04-11 23:17:18 +00:00
Ian Lance Taylor
de3b08ac2e Added -D (--dynamic) option to nm and -T (--dynamic-syms) and -R
(--dynamic-reloc) arguments to objdump.
	* nm.c (dynamic): New static variable.
	(long_options): Added "dynamic".
	(usage): Mention -D and --dynamic.
	(main): Add D to getopt string.  Handle -D by setting dynamic.
	(display_rel_file): If dynamic is non-zero, read dynamic symbols
	rather than normal symbols.
	* nm.1: Updated for -D (--dynamic) option.
	* objdump.c (dump_dynamic_symtab): New global variable.
	(dump_dynamic_reloc_info): New global variable.
	(dynsyms, dynsymcount): New global variables.
	(usage): Mention -R, -T, --dynamic-syms and --dynamic-reloc.
	(long_options): Added "dynamic-reloc" and "dynamic-syms".
	(slurp_symtab): If no symbols, return rather than exit.
	(slurp_dynamic_symtab): New function.
	(display_bfd): Handle dump_dynamic_symtab and
	dump_dynamic_reloc_info.
	(dump_symbols): Take new dynamic argument, indicating whether to
	display dynamic symbols.
	(dump_relocs): Move most printing into dump_reloc_set.
	(dump_dynamic_relocs): New function.
	(dump_reloc_set): New function, extracted from dump_relocs.
	(main): Add R and T to getopt string.  Handle -T by setting
	dump_dynamic_symtab and -R by setting dump_dynamic_reloc_info.
	* objdump.1: Updated for -R (--dynamic-reloc) and -T
	(--dynamic-syms) options.
	* binutils.texi: Updated for new nm and objdump options.
1994-04-07 02:04:34 +00:00
Ian Lance Taylor
0397592594 Only build PowerPC stubs if we are converting a PowerPC object file. 1994-03-31 04:59:09 +00:00
Ian Lance Taylor
ae5d2ff573 Update for recent BFD changes to symbol and reloc reading. Rename
all uses of get_symtab_upper_bound to bfd_get_symtab_upper_bound.
	Also:
	* coffgrok.c (symcount): Change to long.
	(do_sections_p1): Check for error return from
	bfd_get_reloc_upper_bound.  Change relcount to long, and check for
	error from bfd_canonicalize_reloc.
	(coff_grok): Change storage to long.  Check for error from
	bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
	* nlmconv.c (main): Change symcount, newsymalloc, newsymcount, and
	i to long.  Check for error from bfd_get_symtab_upper_bound and
	bfd_canonicalize_symtab.
	(copy_sections): Change reloc_size and reloc_count to long.  Check
	for error from bfd_get_reloc_upper_bound and
	bfd_canonicalize_reloc.
	(mangle_relocs, i386_mangle_relocs, alpha_mangle_relocs): Change
	reloc_count_ptr argument to long *.  Make corresponding changes to
	variables loaded from *reloc_count_ptr.
	* nm.c (display_rel_file): Change storage and symcount to long.
	Check for errors from bfd_get_symtab_upper_bound and
	bfd_canonicalize_symtab.
	* objcopy.c (filter_symbols): Change symcount, src_count and
	dst_count to long.
	(copy_object): Change symcount to long.  Pass another argument to
	fprintf.  Check for errors from bfd_get_symtab_upper_bound and
	bfd_canonicalize_symtab.
	(copy_section): Change relcount to long.  Check for errors from
	bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
	(mark_symbols_used_in_relocations): Change relcount and i to long.
	Check for errors form bfd_get_reloc_upper_bound and
	bfd_canonicalize_reloc.
	* objdump.c (storage): Remove global variable.
	(symcount): Changed to long.
	(slurp_symtab): New local variable storage.  Check for errors from
	bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
	(remove_useless_symbols): Change return value and count to long.
	(objdump_print_address): Change min, max, thisplace and i to long.
	(disassemble_data): Change i to long.
	(dump_symbols): Change count to long.
	(dump_relocs): Change relcount to long.  Check for errors from
	bfd_ret_reloc_upper_bound and bfd_canonicalize_reloc.
	(display_info_table): Add casts when passing LONGEST_ARCH for
	printf %* argument.
1994-03-30 22:06:17 +00:00
Ian Lance Taylor
8f197c94e3 * objdump.c (display_file): Close each archive element after it
has been displayed.
1994-03-29 21:34:44 +00:00
Ian Lance Taylor
8baf459bbe Fix last patch. 1994-03-29 20:34:10 +00:00
Ian Lance Taylor
9f191108c1 * nm.c (display_archive): Close each archive element after it has
been displayed.
1994-03-29 20:00:09 +00:00
Jeffrey Osier
20465f8bd1 binutils.texi(nlmconv): added -d/--debug and -l/--linker info 1994-03-29 00:53:16 +00:00
Ian Lance Taylor
934ec70a4e * configure.in: Change error message to refer to bfd/config.bfd
rather than bfd/configure.in.
1994-03-28 18:05:12 +00:00
Jeff Law
77ccab3c95 * More fixes for object formats which allow multiple sections
with the same name:
        * objcopy.c (setup_section): Make a new output section even if
        one already exists with the given name.
        (copy_section): Use isection->output_section rather than trying
        to look the output section up by its (possibly non-unique) name.
1994-03-28 00:25:15 +00:00
Ian Lance Taylor
93e53ea4d9 * objdump.c (objdump_print_address): Make static. Declare with
prototype.  Change vardiff from int to bfd_signed_vma.  Correct
	binary search termination condition.  When looking for same
	section symbol in relocatable file, handle final symbol correctly.
1994-03-21 17:58:39 +00:00
Jeff Law
4e85e79f4f * Makefile.in: Avoid bug in hpux sed. 1994-03-20 23:40:41 +00:00
Jeff Law
fb158b92f9 * objcopy.c: Changes to keep it from stripping symbols used
in output relocations.
        (mark_symbols_used_in_relocations): New function.  Mark symbols
        used in output relocations with BSF_KEEP.
        (filter_symbols): Do not strip symbols marked with BSF_KEEP.
        (copy_object): Reorder actions.  First setup sections, then
        build the output symbol table, then copy the section contents.
1994-03-20 19:27:40 +00:00
Ian Lance Taylor
60e9faebc1 * ar.c (write_archive): Allocate space for the null byte. From
Robert Lipe <robertl@arnet.com>.
1994-03-18 15:55:27 +00:00
Roland Pesch
20f774c12e Minor update to list of programs for dir.info entry. 1994-03-17 22:43:04 +00:00
Ian Lance Taylor
06459c063e * Makefile.in: Built nm.new and strip.new to avoid problems with
collect when . is in PATH.
	(STRIP_PROG): Change from strip to strip.new.
	(NM_PROG): Change from nm to nm.new.
	(install): Remove the .new when installing.
1994-03-17 21:22:30 +00:00
Jeff Law
1d483829ad * objcopy.c (filter_symbols): Use bfd_is_local_label to determine
if a symbol represents a compiler-generated local label.
	(copy_object): Give the BFD backends a chance to copy any private
	bfd data from the input BFD to the output BFD.
	(setup_section): Give the BFD backends a chance to copy any private
	section data from the input section to the output section.
1994-03-16 07:04:42 +00:00
Jeff Law
c956356797 * objcopy.c (mangle_section): Delete unused function.
(setup_section): Set osection here instead of calling
        mangle section to do it.
1994-03-14 19:36:15 +00:00
Ian Lance Taylor
ad8e3db940 * ar.c (write_archive): Close inarch before unlinking it. 1994-03-14 17:14:08 +00:00
Ian Lance Taylor
4bd7a65f5f * nlmconv.c (main): For PowerPC, call powerpc_build_stubs and
powerpc_resolve_stubs.  Use __GOT0, not __toc_start.  Handle it if
	the start and end symbols are not in the text section.
	(struct powerpc_stub): New struct definition.
	(powerpc_stubs, powerpc_stub_insns): New static variables.
	(powerpc_initial_got_size): New static variable.
	(powerpc_build_stubs): New function.
	(powerpc_resolve_stubs): New function.
	(powerpc_mangle_relocs): Clear extraneous data in .got section.
	Rearrange reloc handling to handle ELF relocs that are not
	partial_inplace.  Resolve PC relative relocs.
1994-03-12 03:26:12 +00:00
Steve Chamberlain
9fdf266ccc * ar.c (move_members): Fix it so that the abi positional modifiers
don't delete all archive members following the insert point.
1994-03-09 21:53:54 +00:00
Steve Chamberlain
e52e2acd51 * coffgrok.[ch]: New files, understand coff objects.
* coffdump.c: Uses coffgrok to dump out the debug info of a coff
	file.
	* sysroff.info: Description of a SYSROFF object file.
	* sysinfo.y, syslex.l: Parse info file, generate a reader, writer,
	header files and a printer.
	* srconv.c: Uses coffgrok.c and sysroff.info to convert a coff
	file to a SYSROFF file.
1994-03-08 21:53:19 +00:00
Ian Lance Taylor
33e61c95a2 Set Emacs local variables to never use version control. 1994-03-08 19:16:31 +00:00
Stan Shebs
7d1257bb57 Sanitization changes to reflect other comings and goings 1994-02-26 21:42:44 +00:00
Stan Shebs
a284b7fcc0 Set archdefs manually. 1994-02-26 21:42:08 +00:00
Stan Shebs
6cc30a1194 Sat Feb 26 13:31:44 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-make (install): Replace with MPW-specific actions.
	* mpw-build.in: Remove, functionality subsumed in mpw-make.in.
1994-02-26 21:40:20 +00:00
Stan Shebs
6eb243a23d Sat Feb 26 13:35:26 1994 Stan Shebs (shebs@andros.cygnus.com)
* ar.c (do_quick_append): Pad with a genuine character 10,
	rather than whatever '\n' might happen to be.
1994-02-26 21:38:04 +00:00
Rob Savoye
d5dd58dee0 Remove trash left from Makefile cut & paste. 1994-02-22 22:55:24 +00:00
Ian Lance Taylor
d1a7f14f54 * nlmconv.c: Include libiberty.h.
start-sanitize-powerpc-netware
	Support for PowerPC NetWare.
	* nlmconv.c (main): For PowerPC NetWare, automatically define the
	special symbols __toc_start.
	(select_output_format): Handle bfd_arch_powerpc.
	(mangle_relocs): Likewise.
	(powerpc_mangle_relocs): New function.
end-sanitize-powerpc-netware
1994-02-21 02:57:01 +00:00
Ken Raeburn
bc9cb7ca39 revised for Rob's changes 1994-02-18 22:13:24 +00:00
Jeffrey Osier
8981cac563 binutils.texi: fixed dir-entry, copyright date, last chapter a bit 1994-02-18 00:15:58 +00:00
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
Rob Savoye
67d4024b7b "Default" procedures for any host. 1994-02-15 17:01:12 +00:00
Rob Savoye
caa0901f00 Swap order of config names to match so vxworks is before m68k. 1994-02-15 04:30:10 +00:00
Rob Savoye
71ae6c3153 Set correct values for NM, SIZE etc... 1994-02-15 03:44:51 +00:00
Rob Savoye
d46d1d05d3 Leave it for the init file to identify proper binary to run. 1994-02-15 03:44:22 +00:00
Rob Savoye
6010088699 Use new config features of DejaGnu in site.exp file. 1994-02-15 03:33:46 +00:00
Rob Savoye
dcc5408195 Add "-N". 1994-02-15 03:32:22 +00:00
Rob Savoye
ff08df75bb Rearranging so cross testing will work. 1994-02-14 18:30:48 +00:00
David MacKenzie
704bbd0dc3 * objcopy.c (strip_main, copy_main): Add missing 'break' in switch. 1994-02-11 23:56:49 +00:00
Jeffrey Osier
10f2a7f6ac binutils.texi: minor formatting updates for next release 1994-02-07 23:19:00 +00:00
Jeffrey Osier
9ccc1b37fa nlmconv.1: minor fix 1994-02-07 23:07:38 +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
74557dc6bb Mon Jan 31 18:52:47 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-build.in: Add install action.
	* mpw-make.in (cplusfilt): Renamed from c++filt.
	(INCLUDES): Add more paths.
1994-02-01 03:23:19 +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
Rob Savoye
03372cf4ab Change all occurances of RUNTEST_FLAGS to RUNTESTFLAGS to be consistant with
everything else. (and now work recursively too)
1994-01-26 21:44:50 +00:00
Stan Shebs
42d11afacc Removed objdump.h 1994-01-26 03:46:17 +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
Rob Savoye
5e351ee1bc Add lib dir and utils-lib.exp. 1994-01-25 22:28:03 +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
Rob Savoye
8c2b25dd9b Change RUNTESTFLAGS to RUNTEST_FLAGS to be consistant with FLAGS_TO_PASS. 1994-01-25 02:09:26 +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
5fd5199353 Sat Jan 22 16:25:09 1994 Stan Shebs (shebs@andros.cygnus.com)
* 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.)
1994-01-23 00:34:31 +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
Ken Raeburn
446918c82c * binutils.all/objdump.exp: Trim list of format names expected, and accept any
known CPU type.
1994-01-17 21:58:53 +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
6336b309dc gcc -Wall lint:
* 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.
1993-12-23 17:29:06 +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
Rob Savoye
00d8666550 * config/unix.exp: Add global before seeing if the variables for
nm, objdump, and size exist.
1993-12-03 04:07:15 +00:00
Rob Savoye
2031a59499 * Makefile.in: Remove some stuff from the site.exp file.
* config/unix.exp: Add global before seeing if the variables for
        nm, objdump, and size exist.
1993-12-03 04:06:44 +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
a30f59a465 Restore changes clobbered by Sean's check in. 1993-12-02 01:03:03 +00:00
Jeffrey Osier
5b0ba16d41 * binutils.texi: fix bug in nlmconv doc 1993-11-23 22:39:01 +00:00
Jeffrey Osier
4961ce5b9c binutils.texi: minor fix for nlmconv chapter 1993-11-19 21:12:49 +00:00
Jeffrey Osier
3883531f52 * nlmconv.1: new man page
* objcopy.1:  fixed format errors
1993-11-17 22:51:16 +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
Ken Raeburn
223deb2760 Trying to fix repository after cvs breakage... 1993-11-05 20:21:39 +00:00
Jeffrey Osier
94e9ad7723 binutils.texi: added nlmconv chapter 1993-11-05 20:13:42 +00:00
Ken Raeburn
87ce76559c First cut at sanitization, doc files, &c for gas/binutils releases 1993-11-05 19:21:35 +00:00
Jeffrey Wheat
51b7bf87a0 Rename RUNTESTFLAGS to RUNTEST_FLAGS 1993-11-04 16:08:03 +00:00
Rob Savoye
73e1e09b8e * config/udi.exp,unix.exp: Transform tool name.
* binutils.all/*.exp: Clear errorInfo after exec.
1993-11-03 18:15:18 +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
eed5eeab82 put objcopy in alphabetical order 1993-10-30 02:24:39 +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
Mark Eichin
80d19ec1fc hide declaration of fprintf inside FPRINTF_ALREADY_DECLARED, because
this declaration can be wrong but there must *be* a declaration for
include/dis-asm.h to work.
1993-10-22 18:04:09 +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
f993f087da * Makefile.in (objdump.o): Depend upon config.status to notice
--with-targets changes.
	(nlmconv.o): Depend upon bucomm.h.
1993-08-31 17:46:56 +00:00
David D. Zuhn
af9508b2fb nuke chill stuff from Makefile 1993-08-23 19:46:22 +00:00
David MacKenzie
dc4fba51d2 remove mention of nm 1993-08-13 00:11:22 +00:00
David MacKenzie
d6a4c37569 * Makefile.in ($(NM_PROG)): Depend on demangle.o.
(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.
1993-08-13 00:02:25 +00:00
David MacKenzie
bba04d9321 Wed Aug 11 22:57:23 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* 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.
1993-08-12 18:00:36 +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
Ian Lance Taylor
d92aadfd5a Write out all the header information, except the SHARELIB stuff which
is still not implemented.
1993-08-11 18:30:39 +00:00
Ian Lance Taylor
d130c9c5b9 Added new files. 1993-08-10 17:50:28 +00:00
Ian Lance Taylor
4f55ef5bdb Checkpoint of NLM conversion program.
* 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.
1993-08-10 17:49:44 +00:00
David MacKenzie
c2b781a26e make failure nonfatal 1993-08-05 00:20:27 +00:00
David MacKenzie
ed78872a7f fix doc bug 1993-08-04 00:39:19 +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
b26ac61376 * Makefile.in: Note dependencies on bucomm.h.
(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.
1993-06-28 02:17:13 +00:00
David MacKenzie
fa02194747 * Fix a couple of typos. 1993-06-26 06:42:46 +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
Steve Chamberlain
a3a0a4d0a5 Look in the right place for bfd.h. 1993-06-18 21:08:36 +00:00
David D. Zuhn
5ebaf24b77 single-quote $program_transform_name 1993-06-18 19:25:38 +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
Ian Lance Taylor
672f4045d6 o - size
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.
1993-06-14 20:17:35 +00:00
David MacKenzie
5dfb600429 Add some nm comments. 1993-06-11 18:39:25 +00:00
Per Bothner
f63e502ba1 * objcopy.c (copy_object): Fix bad size passed to xmalloc(). 1993-06-11 00:34:26 +00:00
Per Bothner
0019b19054 * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
* configure.in:  No longer need to configure to get sysdep.h.
	* objcopy.c (copy_object):  Fix symbol table handling.
1993-06-07 19:45:12 +00:00
David D. Zuhn
d6391983cb update INFO-DIR-ENTRY 1993-06-04 23:24:37 +00:00
David D. Zuhn
4f79b3c547 change srctriggeer to a local FILE not a DIRECTORY 1993-06-04 17:55:08 +00:00
Jeffrey Osier
1889f66266 * c++filt.1: fixed %^*(^% typo 1993-06-03 19:25:36 +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
38e799d231 binutils.texi: put in zoo's info-dir entry stuff (it's cleaner) 1993-06-03 00:29:32 +00:00
Jeffrey Osier
5eac46ae03 binutils.texi: final tweaks for c++filt chapter 1993-06-02 23:43:10 +00:00
Rob Savoye
4cf03eb2e7 Add an install-info target too. 1993-06-01 01:40:59 +00:00
Rob Savoye
ece87dfb94 Add info target. 1993-06-01 01:37:45 +00:00
Per Bothner
a9f5cf7be2 * Makefile.in (install): Also install ar and ranlib in
$(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.
1993-05-28 22:07:47 +00:00
Rob Savoye
47a488df26 Add a blank install target so the top level makefile won't die. 1993-05-28 04:31:51 +00:00
Jeffrey Osier
6c69b6bde1 * biutils.texi: revised c++filt chapter 1993-05-28 00:00:59 +00:00
K. Richard Pixley
87756e15db added things-to-lose sections 1993-05-27 06:44:29 +00:00
Ian Lance Taylor
4447efa217 * Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS. 1993-05-27 00:28:16 +00:00
Rob Savoye
b64d5e491a configure.in template that supports *only* make check. (for releases) 1993-05-26 01:55:00 +00:00
Rob Savoye
2a775d5158 Makefile fragment that supports *only* make check. (for releases) 1993-05-26 01:44:49 +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 D. Zuhn
8a6d5d4f93 INFO-DIR-ENTRY formatting tweaks 1993-05-24 22:33:43 +00:00
David MacKenzie
6cfbdb50e6 Move printing from bfd to nm and add POSIX and SysV compatibility. 1993-05-21 21:09:58 +00:00
David MacKenzie
386803c0be Improve error messages. 1993-05-21 19:39:15 +00:00
Ian Lance Taylor
efc7599b10 lib directory is no longer present 1993-05-17 19:32:50 +00:00
Roland Pesch
e32341a77c Minor cleanups to c++filt node, and copyright dates. 1993-05-15 00:35:08 +00:00
Per Bothner
b6216af269 * Makefile.in (underscore.c): Automatically generate
(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.
1993-05-15 00:25:03 +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