Commit Graph

548 Commits

Author SHA1 Message Date
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
Ken Raeburn
09d7f0a658 expect simple-objcopy test to fail on hp300 1994-12-14 21:35:07 +00:00
Ken Raeburn
6273f92d2a disable bintest.o tests on hppa, fix minor sh-coff objcopy setup_xfail problem 1994-12-14 20:59:14 +00:00
Stan Shebs
4fd067b80d * mpw-config.in: Create mk.tmp, define ARCHDEFS in it. 1994-12-13 03:41:18 +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
7e1e1f4d2f binutils-all/objdump.exp: handle "powerpc" cpu 1994-12-08 23:56:01 +00:00
Ken Raeburn
ef1ad8ab8e * binutils-all/objdump.exp (cpus_expected): New variable, taken from objdump -i
test, added ns32k, sorted.
(objdump -i, -f tests): Use $cpus_expected.

* binutils-all/objcopy.exp: For simple-copy test, expect failure for sh-coff.
1994-12-08 19:55:05 +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
Ian Lance Taylor
33e0a06df8 * objcopy.c (gap_fill): Explicitly initialize, for clarity.
(pad_to_set, pad_to): New static variables.
	(copy_options): Accept --pad-to.
	(copy_usage): Mention --pad-to.
	(copy_object): Support --pad-to.
	(compare_section_vma): Sort non loadable sections to the front.
	Sort sections with the same VMA by size.
	(copy_main): Handle --pad-to.
	* binutils.texi, objcopy.1: Document --pad-to.
1994-10-25 20:22:32 +00:00
Ian Lance Taylor
596d99ba32 * objcopy.c (gap_fill_set, gap_fill): New static variables.
(copy_options): Accept --gap-fill.
	(copy_usage): Mention --gap-fill.
	(copy_object): Support --gap-fill.
	(get_sections, compare_section_vma): New static functions.
	(copy_main): Handle --gap-fill.
	* binutils.texi, objcopy.1: Document --gap-fill.
1994-10-20 17:58:23 +00:00
Ian Lance Taylor
9b14c27a1e * Makefile.in (check): Add a dummy else clause to the if
statement.
1994-10-19 18:40:45 +00:00
Ian Lance Taylor
a6afc09071 * objcopy.c (copy_object): Revert yesterday's change.
* binutils.texi, objcopy.1: Remove special mention of --set-start
	and `binary' output format.
1994-10-19 18:11:10 +00:00
Ian Lance Taylor
67f67ed998 * objcopy.c (copy_object): If the output file format is `binary',
and the start address was not set using --set-start, default the
	start address to zero.  This hack is because the `binary' output
	file format uses the start address to set the virtual address of
	the first byte in the file.
	* binutils.texi, objcopy.1: Add some notes on generating S-records
	and binary files.
1994-10-18 19:20:58 +00:00
Ian Lance Taylor
67932b7d02 * nm.c (print_symdef_entry): Call print_symname to print the
symbol name, so that --demangle works.
1994-10-18 16:03:05 +00:00
Ian Lance Taylor
69b608927d * Makefile.in (mostlyclean): Remove tmpdir. 1994-10-18 15:55:10 +00:00
Ian Lance Taylor
09250cfef7 * binutils-all/objcopy.exp: New file.
* config/default.exp: Initialize OBJCOPY and OBJCOPYFLAGS.
1994-10-18 15:51:03 +00:00
Ian Lance Taylor
6c7ed0842d * objcopy.c (struct section_list): Add fields used, adjust, val.
(adjust_start, set_start_set, set_start): New static variables.
	(adjust_section_vma, adjust_sections): New static variables.
	(copy_options): Add --adjust-start, --adjust-vma,
	--adjust-section-vma, --adjust-warnings, --no-adjust-warnings,
	--set-start.
	(parse_vma): New static function.
	(copy_usage): Mention new options.
	(copy_object): Handle --set-start and --adjust-start.
	(setup_section): Correct type of last argument to PTR.  Set used
	field if section is removed.  Handle --adjust-vma and
	--adjust-section-vma.
	(copy_section): Correct type of last argument to PTR.
	(mark_symbols_used_in_relocations): Likewise.
	(strip_main): Clear used field when handling -R.
	(copy_main): Handle new options.
	* binutils.texi (objcopy): Document new options.
	* objcopy.1: Document new options.
1994-10-18 15:49:53 +00:00
Ian Lance Taylor
bd5e713033 clobbered somehow by previous checkin 1994-10-14 22:34:50 +00:00
Ian Lance Taylor
5903dfae1f * configure.in (configdirs): Remove definition--testsuite is no
longer configured.
	* Makefile.in (testsuite): Remove target.
	(site.exp): New target.
	(check): Rewrite.
	(clean, distclean): Don't recur into testsuite directory.
1994-10-14 18:57:57 +00:00
Ian Lance Taylor
3aba335daf Rewrite testsuite.
* configure.in, Makefile.in: Remove.
	* binutils-all/configure.in, binutils-all/Makefile.in: Remove.
	* binutils-all/bintest.c: Remove.
	* binutils-all/bintest.s: New file.
	* binutils-all/nm.exp, binutils-all/objdump.exp: Rewrite.
	* binutils-all/size.exp: Rewrite.
	* config/default.exp: Load utils-lib.exp.  Set AS and ASFLAGS.
	Don't go up one directory from $base_dir.  Create tmpdir.
	(binutils_run, binutils-assemble): New procedures.
	* config/unix.exp: Remove.
	* config/mt-a29k-udi, config/mt-i386-aout: Remove.
	* config/mt-i960-nindy, config/mt-lynx, config/mt-m68k: Remove.
	* config/mt-mips-ecoff, config/mt-slite: Remove.
	* config/mt-sparc-aout, config/mt-vxworks: Remove.
	* lib/utils-lib.exp (binutil_version): Don't redirect standard
	input when getting version.  Don't unset errorInfo.
	(default_binutils_run): New procedure.
	(default_binutils_assemble): New procedure.
1994-10-14 18:56:29 +00:00
J.T. Conklin
b7d9009371 * nlmconv.c (link_inputs): Pass -Ur flag to ld so that the
ctor/dtor tables needed by C++ programs are built.
1994-10-10 20:54:28 +00:00
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