Commit Graph

627 Commits

Author SHA1 Message Date
Ian Lance Taylor 4977f3b47e * Makefile.in (maintainer-clean): New target. 1995-09-12 22:23:17 +00:00
Ian Lance Taylor a9a14e9171 * ar.c (replace_members): Don't call write_archive if nothing
changed.
1995-09-12 19:31:03 +00:00
Ian Lance Taylor 746cffcf6a * objdump.c (disassemble_data): Add casts to avoid gcc warnings. 1995-09-12 16:39:12 +00:00
Ian Lance Taylor 320d4f291f * config.in: Rename from config.h.in.
* configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
	Check for config.h:config.in when creating stamp-h.
	* configure: Rebuild.
	* Makefile.in (stamp-h): Depend upon config.in rather than
	config.h.in.  Set CONFIG_HEADERS to config.h:config.in when
	calling config.status.
1995-09-07 17:12:26 +00:00
Ian Lance Taylor d698bce4c7 * Makefile.in (distclean): Remove config.h, stamp-h, and
config.log.
1995-09-07 16:52:35 +00:00
Ian Lance Taylor dee0c69c27 * nm.c (value_format): Initialize based on BFD64 and
BFD_HOST_64BIT_LONG.
	(print_radix): New static variable.
	(set_print_radix): Set print_radix.  Adjust changes to
	value_format.
	(print_value): New static function, to print 64 bit octal and
	decimal values correctly.
	(print_symbol_info_bsd): Check BFD64, not BFD_HOST_64_BIT.  Use
	print_value.
	(print_symbol_info_sysv): Use print_value.
	(print_symbol_info_posix): Likewise.
1995-09-07 16:14:43 +00:00
Ian Lance Taylor fca4042a3a * Makefile.in (*.o): Remove incorrect dependencies on
$(BFDDIR)/hosts/std-host.h.
1995-09-07 00:35:49 +00:00
Ian Lance Taylor 5ab6ca68fd * configure.in: Rewrite to use autoconf.
* aclocal.m4: New file.
	* configure: New file, built by autoconf.
	* acconfig.h: New file.
	* config.h.in: New file, built by autoheader.
	* Makefile.in: Various changes for new configure script.  Also:
	(PROGS): Remove $(SYSINFO_PROG).
	(ALL_CFLAGS): Remove $(TDEFINES).
	(version.o): Use $(ALL_CFLAGS).
	(cplus-dem.o, dlltool.o, nlmconv.o): Likewise.
	(sysdump.o): Depend upon bucomm.h and config.h.
	(srconv.o, arsup.o, strings.o): Depend upon config.h.
	(filemode.o): Don't depend upon ../bfd/sysdep.h.
	(bucomm.o): Depend upon config.h, not ../bfd/sysdep.h.
	(size.o, objdump.o, nm.o, ar.o, objcopy.o): Likewise.
	(nlmheader.o, nlmconv.o): Likewise.
	(distclean): Don't remove sysdep.h.
	* bucomm.h: Include "ansidecl.h", <stdio.h>, and "config.h".
  	Include "fopen-same.h" or "fopen-bin.h", based on
 	USE_BINARY_FOPEN.  Include <errno.h>, and declare errno if it is
 	not a macro.  Include <unistd.h>, <string.h>, <strings.h>,
 	<stdlib.h>, and <fcntl.h> if they are present.  Declare strchr,
 	strrchr, and strstr if no string header file exists.  Include
	<sys/file.h> if it exists and <fcntl.h> does not.  Define
	O_RDONLY and O_RDWR if necessary.
	* ar.c:  Don't include "sysdep.h".  Do include <sys/types.h> and
	<sys/stat.h>.  Use HAVE_GOOD_UTIME_H rather than POSIX_UTIME.  Use
	HAVE_UTIMES rather than !USE_UTIME.  Don't include <errno.h>, and
	don't declare errno.
	* arsup.c: Don't include <sysdep.h>.
	* bucomm.c: Don't include "sysdep.h".  Include <stdio.h>,
	<sys/types.h>, and <sys/stat.h>.  Include <time.h> if it defines
	time_t.  Define time_t if necessary.
	* coffdump.c: Don't include "sysdep.h".
	* coffgrok.c, filemode.c, nlmconv.c, size.c: Likewise.
	* srconv.c, strings.c: Likewise.
	* nm.c: Don't include "sysdep.h".  Don't try to define HAVE_SBRK.
	* objcopy.c: Don't include "sysdep.h".  Include <sys/types.h> and
	<sys/stat.h>.
	(simple_copy): Use creat rather than assuming that O_CREAT is
	defined.
	* objdump.c: Don't include "sysdep.h".  Use
	NEED_DECLARATION_PRINTF rather than !FPRINTF_ALREADY_DECLARED.
	* sysdump.c: Include "bfd.h" and "bucomm.h".  Don't include
	"sysdep.h" or <stdlib.h>.
	(dump_symbol_info): Rename from symbol_info.  Change all callers.
1995-09-06 00:52:07 +00:00
Ian Lance Taylor 109eb06cce * configure.in (host_makefile_frag): Don't set. Substitute for
@CC@, @CFLAGS@, @HDEFINES@ and @LDFLAGS@ in Makefile.
	* Makefile.in (AR_FLAGS): Set to rc rather than qv.
	(CC): Define as @CC@.
	(CFLAGS): Set to @CFLAGS@.
	(LDFLAGS): Define as @LDFLAGS@.
	(ALL_CFLAGS): Use @HDEFINES@ rather than $(HDEFINES).
1995-09-04 21:14:33 +00:00
Ian Lance Taylor fe48a154b9 * configure.in: Don't bother to call config.bfd for each target.
Just call it for the default target, and use the shell variable to
	decide whether underscores are used.
1995-09-04 18:32:22 +00:00
Jason Molenda 99ac77549e * configure.in: match i[3-6]86-*-win32, not just i386-*-win32. 1995-09-01 02:24:59 +00:00
Steve Chamberlain a65619c8fd Thu Aug 31 16:30:22 1995 steve chamberlain <sac@slash.cygnus.com>
* dlltool.c (add_indirect): New.
	(asm_prefix): New
	(gen_exp_file): Timestamp should be 0. Insert prefix when
	needed. New code for indirection.
	(gen_lib_file): Timestamp should be 0. Insert prefix
	when needed.
	(usage): Document --add-indirect.
	(main): Cope with new option.

	* objdump.c (dump_private_headers): New.
	(usage): Document new option.
	(long_option): Add private-headers.
	(dump_bfd_private_header): New.
	(main): Cope with new option.
1995-08-31 23:34:09 +00:00
David Edelsohn 4828cdbaca * dlltool.c (run): Add missing 3rd arg to waitpid. 1995-08-31 11:10:32 +00:00
Steve Chamberlain 125a4b5819 * Makefile.in (TOOL_PROGS): Include dlltool if needed. 1995-08-30 18:03:16 +00:00
Steve Chamberlain 56297cc6ab Put _iname in idata$7. 1995-08-29 23:27:54 +00:00
Steve Chamberlain f88ebc6861 Tue Aug 29 13:25:21 1995 steve chamberlain <sac@slash.cygnus.com>
* dlltool.c (rva): Deleted.
	(rvaafter, rva_before): Use new assembler pseudo.
	(flush_page, gen_exp_file, gen_lib_file): Use new way of RVAing.
	(gen_exp_file): Don't generate .edata if no need.
	(gen_lib_file): Don't make timestamp.
	(workout_prefix): Fix memory initialization bug.
	(usage): Tidy up, delete many single char options.
	(main): rva option is gone.
1995-08-29 20:29:04 +00:00
Steve Chamberlain 739484a321 * dlltool.c (options): image-base is a synonym for rva. 1995-08-22 01:42:11 +00:00
Steve Chamberlain 2757dc2534 Sun Aug 20 09:59:00 1995 steve chamberlain <sac@slash.cygnus.com>
Modified to generate archives and objects rather than .s files.
	* dlltool.c (run) New function.
 	(gen_exp_file, gen_lib_file): Use run.
	(workout_prefix): New.
	(usage): Document new options.
	(main): Parse new options.
1995-08-20 17:01:27 +00:00
Steve Chamberlain ee473c97b5 * dlltool.c (gen_exp_file): Fix RVA handling.
(rva_s, rva_n): Delete.
1995-08-16 23:28:18 +00:00
Ian Lance Taylor a77024ef11 * binutils-all/nm.exp: Add setup_xfail for mips*-sony-bsd* for
tests which fail on ECOFF targets.
1995-08-16 22:38:42 +00:00
Ian Lance Taylor df0d80dbed * binutils-all/objcopy.exp: Change i*86-*-linux xfail for simple
copy test to check for i*86-*-linuxaout* instead.
1995-08-16 20:54:40 +00:00
Ian Lance Taylor 06e9cb9271 * nm.c (main): Ignore -e.
PR 6758.
1995-08-11 22:29:41 +00:00
Ken Raeburn 9bae56c52d put version number into doc from makefile 1995-08-10 21:42:57 +00:00
Ian Lance Taylor 5357b554ba * coffgrok.c (do_type): Handle array dimensions the same way gdb
does.
1995-08-10 20:12:11 +00:00
Steve Chamberlain fb25704277 * dlltool.c (mtable): New fields.
(ASM_RVA_BEFORE, ASM_RVA_AFTER): New.
	(flush_page, gen_lib_file): Use new macros.
1995-08-09 00:12:18 +00:00
Ian Lance Taylor 28796982b6 * binutils-all/objcopy.exp: Add setup_xfail for a29k-*-vxworks*
for simple copy test.
1995-08-08 21:49:12 +00:00
Jeff Law a445cee717 * objcopy.c (mark_symbols_used_in_relocations): Handle sections
with no relocations.
	* coffgrok.c (do_sections_p1): Likewise.

Fix for net bug.
1995-08-05 06:18:31 +00:00
Ian Lance Taylor 67ace729ef * strings.c (print_strings): For compatibility with existing
strings programs, print strings which are not terminated with a
	null byte or a newline.
	* binutils.texi, strings.1: Update documentation accordingly.
1995-07-31 17:24:17 +00:00
Ian Lance Taylor a59b3dda91 * ar.c (replace_members): For compatibility with existing ar
programs, permit users to add the same file multiple times.
1995-07-31 16:52:02 +00:00
Ian Lance Taylor 5f0570473a * strings.c (DATA_FLAGS): Remove SEC_DATA.
(main): If no file names are given, scan standard input.
	* binutils.texi, strings.1: strings now scans non-data sections by
	default.
1995-07-25 15:26:54 +00:00
J.T. Conklin 52c06ee494 srconv.c (writeINT): When size == -2, use 2 bytes for the h8300 and 4 bytes
for the	sh.
1995-07-24 23:41:19 +00:00
J.T. Conklin 0ab7604296 * srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh.
* sysdump.c (fillup): Return size - 1, the last byte is a checksum
and shouldn't be counted.
* sysroff.info (hd): Changed segment identifier from a byte to a 1
bit field.  The sysroff 2.0-01 specification seems to be in error
here.  Reduce width of following "spare" field from 4 to 3 bits.
(rl): Changed order and width of first 4 bitfields to correspond
to sysroff specification.
(dln_head, dln_inside, dln_tail): Removed.
1995-07-24 21:02:03 +00:00
J.T. Conklin 5a25ad782b * sysdump.c (dh): Changed format of output to be 16 hex digits
followed by 16 ascii characters, similar to Emacs' hexl-mode,
to make it easier to read.
1995-07-14 20:47:19 +00:00
J.T. Conklin 19f6aedd53 * srconv.c (wr_tr): Write out handcrafted tr block.
(walk_tree_symbol): Use evallen and evalue instead of
vallen & value because of corresponding changes in
sysroff.info.

* sysdump.c (sysroff_swap_tr_in, sysroff_print_tr_out): New
functions.

* sysroff.info (tr): the tr block is a special case --- a block
without contents --- which can't be handled by generated code.
(den, dpp): only first byte is present for DENend, DPPend.
(dsy): describe a conditional portion of block, rename some fields.
(dps): describe a conditional portion of block.
(dfl): removed.

* sysinfo.y (yyerror): write error message to standard error.
1995-07-13 22:43:48 +00:00
Ian Lance Taylor c9c49bd961 * Makefile.in (DISTSTUFF): Add arparse.h and sysinfo.h.
(mostlyclean): Remove y.output.
	(clean): Remove sysroff, sysroff.c, sysroff.h, and sysinfo.

	* nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t.
	* objcopy.c (copy_object): Likewise.
1995-07-13 17:50:55 +00:00
Ian Lance Taylor 2604db83a6 * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT.
(struct size_sym): Define.
	(show_stats): New static variable.
	(long_options): Add undocumented option "stats".
	(main): Print memory stats if requested.
	(sort_bfd, sort_dynamic, sort_x, sort_y): New static variables.
	(numeric_forward): Use minisymbols rather than asymbols.
	(non_numeric_forward): Likewise.
	(size_forward1): Rename from size_forward.  Use minisymbols.
	(size_forward2): New static function.
	(sort_symbols_by_size): Take new arguments dynamic, size, and
	symsizep.  Use minisymbols.  Don't store the size back in the
	symbol; store in a newly allocate struct size_sym array.
	(display_rel_file): Read minisymbols rather than asymbols.  Set
	sort_* variables.  Call print_size_symbols if sorting by size.
	(filter_symbols): Take new arguments dynamic and size.  Use
	minisymbols.
	(print_symbols): Likewise.  Call print_symbol for actual printing.
	(print_size_symbols): New static function.
	(print_symbol): New static function.
PR 5332.
1995-07-13 14:50:08 +00:00
Ian Lance Taylor e4f35679a9 * objdump.c (dump_section_stabs): Only print each stabs section
once.
	(compare_relocs): Make it clear to gcc that this always returns a
	value.
1995-07-12 14:44:46 +00:00
Ian Lance Taylor d1a917c56a Wed Jul 12 10:40:23 1995 H.J. Lu <hjl@nynexst.com>
* objcopy.c (simple_copy): Preserve errno on failure.
	(smart_rename): Print error mesage if simple_copy fails.
1995-07-12 14:42:08 +00:00
Ian Lance Taylor 6a4549e788 Remove C comment characters from modified FSF address in expect scripts. 1995-07-10 15:01:16 +00:00
Ken Raeburn 943fbd5bd5 fsf address update, but not in COPYING files 1995-07-07 22:49:42 +00:00
Ian Lance Taylor 0d84aa0f4b * nm.c (size_forward): Check yf against yn, not xn.
PR 7276.
1995-07-04 21:05:23 +00:00
Ian Lance Taylor 4c8d7e6be1 * objcopy.c (copy_archive): Record all output BFD's, and close
them before unlinking them and removing the temporary directory,
	to avoid NFS problems.
PR 6795.
1995-07-04 20:47:10 +00:00
Ian Lance Taylor cbd0453da4 Rename truncate to ar_truncate 1995-07-04 20:38:00 +00:00
Ian Lance Taylor 52af6a44ad * ar.c (replace_members): In verbose messages, use 'r' when
replacing a member, and 'a' when adding one.

	* ar.c (truncate): New static variable.
	(normalize): Change return type to const char *.  Add abfd
	argument.  Change all callers.  If truncate, chop the filename to
	abfd->ar_max_namelen.
	(main): For the 'f' modifier, set truncate to true.  Don't change
	quick_append to replace to truncate is true.
	(do_quick_append): If truncate, set BFD_TRADITIONAL_FORMAT.
	(write_archive): Likewise.
	* binutils.texi, ar.1: Document 'f' modifier.
PR 6888.
1995-07-04 20:28:29 +00:00
Ian Lance Taylor 9135e5f83b * objcopy.c (enum strip_action): Define strip_unneeded.
(OPTION_STRIP_UNNEEDED): Define.
	(strip_options): Add "strip-unneeded".
	(copy_options): Likewise.
	(copy_usage): Mention --strip-unneeded.
	(strip_usage): Likewise.
	(is_strip_section): Strip debugging sections if strip_unneeded.
	(filter_symbols): If strip_unneeded, only keep BSF_KEEP symbols.
	(copy_object): If strip_all, discard symbols without checking
	discard_locals.
	(copy_object): Call filter_symbols if strip_unneeded.
	(setup_section): Strip debugging sections if strip_unneeded.
	(copy_section): Likewise.
	(strip_main): Handle OPTION_STRIP_UNNEEDED.
	(copy_main): Likewise.
	* binutils.texi, objcopy.1, strip.1: Document --strip-unneeded.
PR 6684.
1995-07-04 18:52:27 +00:00
Steve Chamberlain 002898399e Mon Jul 3 14:16:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
* configure.in (i386-*-win32): New configuration.
	* dlltool.c (killat, xlate, usage, long_options, main):
	Understand and cope with -k option.
1995-07-03 21:20:26 +00:00
Fred Fish 8190614e91 * ar.c: (extract_file): Change "#if POSIX_UTIME" to
"#ifdef POSIX_UTIME" to match other tests of POSIX_UTIME
	and avoid lossage when POSIX_UTIME is not defined at all.
1995-07-01 19:28:13 +00:00
Steve Chamberlain 6f2d32120e * ar.c: (print_contents.c, extract_file, do_quick_append):
Malloc buffers rather than allocate on stack (so it works
	on NT).
	* deflex.l: Names can have an @ in them.
	* dlltool.c: Loads of stuff. Can now generate .imp files which
	work with NT .dlls.
1995-06-29 00:59:07 +00:00
Stan Shebs 71fa3485f9 * mpw-make.in (demangle.c.o): Remove.
(arparse.h): Depend on arparse.c instead of arparse.y.
1995-06-23 03:02:53 +00:00
Ken Raeburn 652970ff68 fix diststuff/realclean handling of info files 1995-06-21 21:48:03 +00:00