Commit graph

308 commits

Author SHA1 Message Date
Steve Chamberlain
125a4b5819 * Makefile.in (TOOL_PROGS): Include dlltool if needed. 1995-08-30 18:03:16 +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
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
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
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
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
Ken Raeburn
652970ff68 fix diststuff/realclean handling of info files 1995-06-21 21:48:03 +00:00
Ken Raeburn
65b175c5e6 * objdump.c (compare_relocs): If relocation entries have the same address, keep them in file order. 1995-06-21 21:44:06 +00:00
Steve Chamberlain
13e4db2e3c * dlltool.c: Change names of generated files. .*.s-> -*.s
* objdump.c (dump_section_stabs):  Check for names
	which are supersets of selected names. binutils/7240.
1995-06-20 16:33:28 +00:00
Steve Chamberlain
765e60a947 Wed Jun 14 13:27:22 1995 Steve Chamberlain <sac@slash.cygnus.com>
* deflex.l, defparse.y, dlltool.c: New files.
	* Makefile.in, configure.in: Support for them.

Mon Jun 12 11:27:54 1995  Steve Chamberlain  <sac@slash.cygnus.com>

	* sysdump.c: Include sysdep.h
	(main): Open input with FOPEN_RB.  binutils/7137
1995-06-14 20:28:36 +00:00
Michael Meissner
4b6d0f7873 PR 7046: use unsigned compares in looking up items in the sorted symbol list, not signed; Also add --wide to print on wide columns 1995-06-09 21:42:47 +00:00
Ken Raeburn
3bb1b4171a * Makefile.in: Delete lines with lots of #### because four or more indicate a
point for makefile fragment substitution.
1995-05-30 18:28:52 +00:00
Steve Chamberlain
f302a4d978 Wed Apr 26 18:26:21 1995 Steve Chamberlain <sac@slash.cygnus.com>
* srconv.c (main): Add support for -n option which disables
	prescan of common symbols.
	(wr_ob): If reading past the end of a section, fill with zeros.
1995-04-27 01:59:19 +00:00
Ken Raeburn
d3c66665b5 * objdump.c (dump_section_header): Display load address after virtual memory
(run-time) address.
1995-04-26 01:16:41 +00:00
Ian Lance Taylor
fb3f84c773 * strings.c: Include "bfd.h" before other headers. Include
"sysdep.h".
	* bucomm.c (print_arelt_descr): Cast st_uid and st_gid to long,
	and print them with %ld.
1995-03-24 16:49:14 +00:00
Ian Lance Taylor
be1d162bb4 * bucomm.c (list_supported_targets): New function.
* bucomm.h (list_supported_targets): Declare.
	* ar.c (usage): Call list_supported_targets.
	* nm.c (usage): Likewise.
	* objcopy.c (copy_usage, strip_usage): Likewise.
	* objdump.c (usage): Likewise.
	* size.c (usage): Likewise.
	* strings.c (usage): Likewise.
PR 6345.
1995-03-06 18:49:17 +00:00
Ian Lance Taylor
24b39a7e19 x 1995-02-15 05:19:44 +00:00
Ken Raeburn
236857e50c * objdump.c (disassemble_data): Pass section offset, not absolute address, to
bfd_find_nearest_line.

* nlmconv.c (powerpc_mangle_relocs): Don't use const with reloc_howto_type.
1995-02-04 00:11:07 +00:00
Michael Meissner
39e5cbd7ee Add support for PowerPC embedded ABI. 1995-01-26 17:07:03 +00:00
Ian Lance Taylor
958998b7aa gcc -Wall lint.
* coffdump.c (dump_coff_scope): Cast pointer to unsigned long for
	printf.
	* coffgrok.c: Include bucomm.h.  Don't declare xmalloc.
	(push_scope): Declare type of parameter link.
	* size.c: Include libiberty.h.
	* srconv.c: Include bucomm.h.
	(find_base): Declare at top of file.
	(wr_hd): Add default case to architecture switch.
	(wr_dps_start): Declare type of parameter nest.
	(wr_du): Comment out variables used only in commented out blocks.
	(wr_dus): Remove unused variable i.
	(wr_sc): Remove unused variables myinfo, low, and high.
	* strings.c: Include libiberty.h.
	* sysdump.c: Include <ctype.h>.
1995-01-18 17:27:52 +00:00
Ian Lance Taylor
c2efd5a120 * ar.c (main): Ignore 'f' modifier used on HP/UX 9. 1994-12-21 00:15:14 +00:00
Ken Raeburn
63ca9597f0 removed some unreachable code from objcopy 1994-12-14 21:37:00 +00:00
Ian Lance Taylor
277187d793 * nlmconv.c (powerpc_mangle_relocs): Don't switch a reloc to use
the section symbol if the symbol is undefined.
1994-12-09 05:25:00 +00:00
Ken Raeburn
4af19c6151 objcopy.c (add_strip_symbol): Cast return value of xmalloc. 1994-12-08 19:46:25 +00:00
Ian Lance Taylor
29c0d15c01 Thu Nov 17 15:37:19 1994 Mark W. Eichin <eichin@cygnus.com>
* objcopy.c (add_strip_symbol): New function, adds a name to an
	explicit list of symbols to strip.
	(is_strip_symbol): New function, reports whether the name argument
	is in the explicit list.
	(filter_symbols): Check against is_strip_symbol above all.
	(strip_main): Recognize -N option. If used, don't default to
	strip_all.
	(copy_main): Recognize -N option.
	(strip_usage): Document -N and --strip-symbol options.
	(copy_usage): Ditto.
	* objcopy.1, strip.1, binutils.texi: Document -N and
	--strip-symbol options.
1994-11-18 16:00:41 +00:00
Ian Lance Taylor
f618f758e9 * ar.c (main): Don't call do_quick_append if any of the archive
names are longer than 14 characters.
PR 5966.
1994-11-17 23:03:30 +00:00
Ian Lance Taylor
87a15686e4 * objcopy.c (main): Fix is_strip test. From
pirker@eiunix.tuwien.ac.at (Martin Pirker).
1994-11-17 20:12:51 +00:00
Ian Lance Taylor
eb88e5ee98 * objcopy.c (copy_archive): Keep a list of the names of the
temporary files we created.  Close each input BFD after we open
        its successor.
PR 5915.
1994-11-08 18:16:10 +00:00
Ken Raeburn
6f383ce55d Changes from binutils-2.5.2 net release:
* Makefile.in (install-info): Install info files from whatever directory they
were found in.

Patch from DJ Delorie:
* configure.bat: do c++filt -> cxxfilt right

* sysinfo.y: Include system header files early, so any potential declaration of
abort() occurs before its use.

* strings.c (strings_file): Try opening the file in binary mode first.
1994-11-04 00:07:02 +00:00
Ian Lance Taylor
e640e6644d * ar.c (main): Treat ar qs like ar rs. 1994-11-02 20:45:02 +00:00