Commit Graph

11688 Commits

Author SHA1 Message Date
Ian Lance Taylor d40d2d30a0 * Makefile.in (ALL_MACHINES): Add tekhex.o.
* targets.c (bfd_target_vector): If SELECT_VECS is not defined,
	include tekhex_vec.
	* tekhex.c (NIBBLE, ISHEX): Cast array arguments to unsigned char.
	(getvalue, getsym, out): Likewise.
	(find_chunk): Remove unused variable s.
	(first_phase): Remove unused variable s.
	(pass_over): Remove unused variable address.
	(tekhex_object_p): Remove unused variable section.
	(move_section_contents): Change return type from boolean to void.
	(tekhex_write_object_contents): Remove unused variables tdata and
	list.
1994-10-25 19:11:46 +00:00
Ian Lance Taylor 4bb0cc41f2 * config/tc-mips.c (mips_cpu): Initialize to -1.
(md_begin): Don't mips_cpu if it was already set.
	(md_parse_option): For -mipsN, don't set mips_cpu if it was
	already set.  For -mcpu=, just set mips_cpu, not mips_isa.
1994-10-25 18:47:09 +00:00
J.T. Conklin 870ae9e6ed * config/i386/tm-nbsd.h: Enable longjmp support. 1994-10-25 16:55:44 +00:00
Ian Lance Taylor fdfe873a8a * ldmain.c (multiple_common): One of the types may now be
bfd_link_hash_indirect.  The old BFD argument may be NULL.
1994-10-25 15:48:09 +00:00
Ian Lance Taylor 9c26be63fd * linker.c (enum link_action): Add CIND.
(link_action): Change COMMON_ROW\indr from MDEF to CREF.  Change
	INDR_ROW\common from MDEF to CIND.
	(_bfd_generic_link_add_one_symbol): In CREF case, handle an
	existing symbol which is indirect rather than defined.  Add new
	CIND case.
1994-10-25 15:47:59 +00:00
Ian Lance Taylor adbae12d78 * bfdlink.h (struct bfd_link_callbacks): Fix comments for
multiple_common field.
1994-10-25 15:38:39 +00:00
Ian Lance Taylor fd9a6abc83 Change S-record backend to use multiple sections to handle gaps in
file.
	* srec.c (srec_data_list_struct): Move field next from last place
	to first.  Change type of data to bfd_byte *.
	(struct srec_symbol): Define.
	(tdata_type): Remove done_symbol_read, count, strings, symbol_idx,
	string_size, string_idx.  Change type of symbols to struct
	srec_symbol *.  Add symtail and csymbols.
	(low, high): Remove.
	(size_symbols, fillup_symbols, size_srec, fillup): Remove.
	(white, skipwhite, pass_over, object_p): Remove.
	(srec_mkobject): Call srec_init.  Adjust tdata initialization for
	field changes.
	(srec_get_byte, srec_bad_byte): New static functions.
	(srec_new_symbol, srec_scan): New static functions.
	(srec_object_p): Change type of b to bfd_byte.  Explicitly set
	wrong_format error.  Call srec_mkobject and srec_scan instead of
	object_p.
	(symbolsrec_object_p): Likewise.  Also, change b to be only two
	bytes.
	(srec_read_section): New static function.
	(srec_get_section_contents): Call srec_read_section rather than
	pass_over.  Handle zero length section correctly.
	(set_set_arch_mach): Change from function to macro.
	(srec_set_section_contents): Change data to bfd_byte *.
	(srec_write_record): Change data, end and src to bfd_byte *.
	(srec_write_header): Change buffer and dst to bfd_byte *.
	(srec_write_section): Change location to bfd_byte *.
	(srec_write_terminator): Change buffer to bfd_byte *.
	(srec_get_symtab_upper_bound): Don't call
	srec_get_section_contents.
	(srec_get_symtab): Rewrite.
1994-10-24 20:08:33 +00:00
Ian Lance Taylor a56f23aeb9 * ecoff.c (ecoff_set_symbol_info): Set udata.i to 0, not NULL. 1994-10-24 19:37:18 +00:00
Peter Schauer d298568482 * valarith.c (value_binop): Take care of ANSI `value preserving'
rule, which was not addressed by the previous change.

	* rs6000-tdep.c (skip_prologue):  Handle `mr r31,r1', which is
	generated by gcc-2.6, as a synonym for `oril r31,r1,0'.

	* TODO:  Remove item about RS/6000 shared libraries.
1994-10-22 10:48:30 +00:00
Ken Raeburn 82e683ab38 additions for binutils release from dj 1994-10-22 02:17:33 +00:00
Ian Lance Taylor 9da4c5d130 * config/tc-mips.c (md_pseudo_table): If OBJ_ELF, handle .section.
(s_elf_section): New static function.
	* ecoff.c (ecoff_build_symbols): Don't abort if we don't recognize
	the section when setting the storage class; default to sc_Data.
1994-10-22 00:51:53 +00:00
J.T. Conklin 32399d323e * libaout.h (machine_type): added M_68K_NETBSD and M_SPARC_NETBSD.
* i386netbsd.c, ns32knetbsd.c, sparcnetbsd.c: removed RCS Id's.
  changed how PAGE_SIZE and SEGMENT_SIZE are defined so they are
  consistant with each other.
* netbsd.h (N_HEADER_IN_TEXT, TEXT_START_ADDR): NetBSD fits its
  header into the start of its text segment.
1994-10-21 23:55:30 +00:00
Ian Lance Taylor cd9782e8fd * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add case for
_construct_extended_name_table.
	(bfd_target): Add _bfd_construct_extended_name_table.
	* archive.c (_bfd_archive_bsd_construct_extended_name_table): New
	function.
	(_bfd_archive_coff_construct_extended_name_table): New function.
	(_bfd_construct_extended_name_table): Renamed by adding a leading
	underscore, and made externally visible.  Added trailing_slash
	argument, and used it instead of elf_style.  Changed type of
	tablen to bfd_size_type *.
	(_bfd_write_archive_contents): Use BFD_SEND to call
	construct_extended_name_table.  Use the returned name.
	* libbfd-in.h (_bfd_construct_extended_name_table): Declare.
	(_bfd_noarchive_construct_extended_name_table): Define.
	(_bfd_archive_bsd_construct_extended_name_table): Declare.
	(_bfd_archive_coff_construct_extended_name_table): Declare.
	* bfd-in2.h: Rebuild.
	* libbfd.h: Rebuild.
	* som.c (som_construct_extended_name_table): New static function.
	* aout-target.h (MY_construct_extended_name_table): Define.
	* coff-rs6000.c (rs6000coff_construct_extended_name_table):
	Define.
	* ieee.c (ieee_construct_extended_name_table): Define.
	* libecoff.h (_bfd_ecoff_construct_extended_name_table): Define.
	* oasys.c (oasys_construct_extended_name_table): Define.
1994-10-21 23:43:29 +00:00
Ian Lance Taylor f93fc38995 fix BFD_ASSERT calls 1994-10-21 23:40:59 +00:00
Ian Lance Taylor 0da41f7d77 remove unused variable 1994-10-21 23:21:19 +00:00
Ian Lance Taylor 12662be4fe Fix the ELF linker to not require an interpreter if no dynamic
objects were seen, even when linking PIC code.
	* libelf.h (ELF_LINK_HASH_NEEDS_PLT): Define.
	(struct elf_link_hash_table): Add field dynamic_sections_created.
	* elfcode.h (elf_link_record_dynamic_symbol): Create dynstr if it
	doesn't already exist.
	(elf_link_add_object_symbols): Create dynamic sections based on
	dynamic_sections_created field, not dynobj field.  Don't bother to
	set dynobj.
	(elf_link_create_dynamic_sections): If dynamic sections were
	already created, don't do anything.  If dynobj is already set, use
	it; otherwise, set it to the bfd argument.  Don't initialize
	dynsymcount.  Only create dynstr if it does not exist.  Set
	dynamic_sections_created to true.
	(NAME(bfd_elf,size_dynamic_sections)): Skip most of this function
	if no dynamic objects were seen.
	(elf_adjust_dynamic_symbol): If a symbol has the
	ELF_LINK_HASH_NEEDS_PLT flag set, let the backend adjust it.
	(elf_bfd_final_link): Change most decisions based on dynobj to
	check dynamic_sections_created instead.
	(elf_link_output_extsym): Only handle dynamic symbols if a dynamic
	object was seen.
	* elf.c (_bfd_elf_link_hash_table_init): Initialize new field
	dynamic_sections_created.  Set dynsymcount to 1, not 0.
	* elf32-i386.c (elf_i386_create_dynamic_sections): Call
	elf_i386_create_got_section rather than creating the .got and
	.got.plt sections.
	(elf_i386_create_got_section): New static function.
	(elf_i386_check_relocs): Just call elf_i386_create_got_section if
	a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
	Only create the .rel.got section, and only make space for a reloc,
	for a global symbol or when generating a shared object.  For a
	R_386_PLT32 reloc, just set the	ELF_LINK_HASH_NEEDS_PLT flag.
	(elf_i386_adjust_dynamic_symbol): Rework initial assertion to
	permit ELF_LINK_HASH_NEEDS_PLT non dynamic symbols.  Create a
	procedure linkage table entry for such symbols.  But, if no
	dynamic objects were seen, never create a PLT entry.
	(elf_i386_size_dynamic_sections): If no dynamic objects were seen,
	skip most of this function, and force the size of the .rel.got
	section to zero.
	(elf_i386_relocate_section): For a R_386_GOT32 reloc against a global
	symbol when no dynamic object was seen, initialize the contents of
	the .got section.  For a R_386_GOT32 against a local symbol, only
	create a R_386_RELATIVE reloc when generating a shared object.
	Treat a R_386_PLT32 reloc against a symbol for which we did not
	create a PLT entry as a R_386_PC32 reloc.
	(elf_i386_finish_dynamic_sections): Only fiddle with the dynamic
	entries and the PLT if we saw a dynamic object.
	* elf32-sparc.c (elf_sparc_howto_table): Fix R_SPARC_PC22 by
	setting rightshift to 10.  Fix R_SPARC_WPLT20 by setting
	rightshift to 2, size to 2, bitsize to 30, and dst_mask to
	0x3fffffff.
	(elf32_sparc_create_dynamic_sections): Don't set the size of the
	.plt section.  Call elf32_sparc_create_got_section rather than
	creating the .got section.
	(elf32_sparc_check_relocs): Call elf32_sparc_create_got_section if
	a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
	Only create the .rela.got section, and only make space for a
	reloc, for a global symbol or when generating a shared object.
	Set the alignment of the .rela.got section to 2.  For a
	R_SPARC_WPLT30 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
	(elf32_sparc_adjust_dynamic_symbol): Rework initial assertion to
	permit ELF_LINK_HASH_NEDS_PLT non dynamic symbols.  Create a
	procedure linkage table for such symbols.  But, if no dynamic
	objects were seen, never create a PLT entry.  Initialize the size
	of the .plt section.
	(elf32_sparc_size_dynamic_sections): If no dynamic objects were
	seen, skip most of this function, and force the size of the
	.rela.got section to zero.  Strip empty reloc sections, and strip
	an empty .plt section.
	(elf32_sparc_relocate_section): For a GOT reloc against a global
	symbol when no dynamic object was seen, initialize the contents of
	the .got section.  For a GOT reloc against a local symbol, only
	create a R_SPARC_RELATIVE reloc when generating a shared object.
	Treat a R_SPARC_WPLT30 reloc against a symbol for which we did not
	create a PLT entry as a R_SPARC_WDISP30 reloc.
	(elf32_sparc_finish_dynamic_sections): Only fiddle with the
	dynamic entries and the PLT if we saw a dynamic object.
1994-10-21 22:00:18 +00:00
J.T. Conklin 6b55e5e3b9 * configure.in (*-*-netware): Use config/mt-netware.
* config/mt-netware: New file.
* config/mt-i386-netware: Removed, separate configs for different
  netware architectures are no longer needed now that we have
  --with-headers.
1994-10-21 18:34:40 +00:00
Per Bothner 42fd579538 * configure.in (target_libs): Remove libstdc++ for libg++-2.6.1. 1994-10-21 02:27:38 +00:00
Ian Lance Taylor 3286598fca * configure.in: Add * at the end of m68k-hp-hpux. 1994-10-21 02:02:54 +00:00
Per Bothner 7e290a5dd3 * config.guess: Merge with FSF.
* configure.in:  Match on i?86-ncr-sysv4.3, not i?86-ncr-sysv43.
1994-10-21 01:55:14 +00:00
Stu Grossman 479f0f18d4 * defs.h, infrun.c (wait_for_inferior), top.c: Call
target_wait_hook to allow GUI to handle blocking for inferior.  Call
	call_command_hook in execute_command to provide means for wrapping
	commands with GUI state change updates.
	* gdbtk.c (gdb_cmd):  Force GUI into idle mode when errors occur.
	* (gdb_stop):  New tcl command to stop the target process.
	* (x_event, gdbtk_wait):  Allow GUI to interrupt gdb out of target
	waits.
	* (gdbtk_call_command):  Wrapper around command processing to
	alert GUI of target state changes.
	* (gdbtk_init):  Get the fd of X server for doing async
	notification of X events (via x_event).  Setup new hooks.
	* gdbtk.tcl:  Add scrollbars to assembly and command windows.
	* Change window foreground & background colors.
	* Create margin tag for breakpoints in source and assembly windows.
	* Add new routines to be invoked when target state changes to/from
	idle.
	* Add start of expression window.
	* Change bindings of mouse button 1 in assembly and source window
	to just set or clear breakpoints when in the margin tag.
	* Change shape of register window to be more vertical to better
	reflect it's contents.
	* Add stop button.
	* Cleanup some code around command window bindings.

	* infrun.c (wait_for_inferior):  Make sure
	through_sigtramp_breakpoint is non-null before deleting.
1994-10-21 00:59:20 +00:00
Ken Raeburn 1b79c34daa * configure: Since the "trap 0" handler will override the exit status on many
systems, only use it for "exit 1", and make it set a non-zero exit status;
reset it before "exit 0".  Also, check exit status of config.sub, and error out
if it failed.
1994-10-20 23:32:46 +00:00
Karen Christiansen 175e702b24 Added irix5 info 1994-10-20 19:25:23 +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
Karen Christiansen 3066e752a5 Added --with-stabs for alpha and sgi5.2 1994-10-20 17:49:11 +00:00
J.T. Conklin e1f49ff388 * config/powerpc/ppc-nw.mt (TDEPFILES): Removed exec.o. 1994-10-20 17:33:05 +00:00
Ian Lance Taylor e4a4da62ab * elfcode.h (elf_map_symbols): Don't worry about section symbols
in a section not owned by any BFD.
	(elf_section_from_bfd_section): Separate out loop which calls
	backend routine.  Check bfd_section and call the backend routine
	even for a section not owned by any BFD.
	* elf32-mips.c (mips_elf_section_from_bfd_section): Handle
	.acommon section.
1994-10-20 17:32:33 +00:00
Jim Kingdon b4b5c9e9a3 * Makefile.in (coffread.o): Depend on target.h.
(remote-vx.o): Depend on gdb-stabs.h objfiles.h symfile.h $(bfd_h).
1994-10-20 14:01:39 +00:00
Jeff Law a7f1f2a8ea * gas/hppa/reloc/blebug3.s: New test.
* gas/hppa/reloc/reloc.exp: Run it.
1994-10-20 06:56:55 +00:00
Jeff Law e443a02120 * config/tc-hppa.c (md_apply_fix): Set new_val to 8 for all
fixups to branch instructions (not just pc-relative ones) which
	will generate SOM relocations.
1994-10-20 06:45:55 +00:00
Jim Kingdon 91dc42c579 * TODO: Fix typo. 1994-10-20 05:52:41 +00:00
Jim Kingdon 3a47045432 * objfiles.c (objfile_relocate): When relocating ->sections, use
objfile not symfile_objfile.

	* symtab.h, minsyms.c (minsyms_sort): New function.
	* objfiles.c (objfile_relocate): Call it.

	* remote-vx.c (vx_add_symbols): Call breakpoint_re_set.

	* objfiles.c, objfiles.h (objfile_to_front): New function.
	* remote-vx.c (vx_add_symbols): Call it.

	* coffread.c (coff_symtab_read): Handle common symbols the same
	way that partial-stab.h does.
1994-10-20 05:15:46 +00:00
Rob Savoye 459877ea9d * hppa-tdep.c: Remove include files a.out.h, ioctl.h, and
machine/psl.h. These are host files.
1994-10-20 04:08:52 +00:00
Jim Kingdon 1e1e7a7ac8 * objfiles.h (struct objfile): Fix comment--minimal_symbol_count
does *not* include the terminating NULL msymbol.
1994-10-19 22:17:38 +00:00
Jim Kingdon dab0844122 * coffgen.c (coff_print_symbol): Make names for section number and
storage class slightly more verbose.  It's not clear how many
	characters I can justify using up, but before this change they
	both were abbreviated "sc" which is (IMHO) clearly unacceptable.
1994-10-19 20:49:03 +00:00
J.T. Conklin efd1a7a152 removed i386-nlmstub.c 1994-10-19 18:41:25 +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 8b65c39307 * binary.c (binary_set_section_contents): Set the base file
position from the lowest section VMA, not the start address.
1994-10-19 18:08:42 +00:00
Ian Lance Taylor 030915dc25 * config/tc-a29k.c: Include ctype.h with angle brackets.
(define_some_regs): Add new special register names defined on the
	29040.
	(parse_operand): Add argument opt.  If non-zero, don't warn about
	a missing operand.
	(machine_ip): If handling argument type 'I', pass opt as non-zero
	to parse_operand.  Handle new optional operand type 'I'.
	(md_undefined_symbol): Handle special register names (srNN).
1994-10-19 17:46:43 +00:00
Ian Lance Taylor 009946c974 * a29k-dis.c (print_special): Add special register names defined
on 29030, 29040 and 29050.
	(print_insn): Handle new operand type 'I'.
1994-10-19 17:41:18 +00:00
Ian Lance Taylor 1a1077dec5 * a29k.h: Add operand type 'I' for `inv' and `iretinv'. On
systems with a separate instruction and data cache, such as the
	29040, these instructions take an optional argument.
1994-10-19 17:36:38 +00:00
Ian Lance Taylor 7494246592 * aoutx.h (NAME(aout,slurp_symbol_table)): Don't return an error
if there are no symbols.
	* coffgen.c (coff_get_normalized_symtab): Likewise.
	* hp300hpux.c (MY(slurp_symbol_table)): Likewise.
1994-10-19 05:30:15 +00:00
Rob Savoye fa52d491eb * monitor.c (monitor_load_srec,monitor_make_srec): Add an asrecord
loader that reads files using BFD and converts it on the fly.
	* monitor.c (set_loadtype_command): Fixed so it doesn't core dump.
	* monitor.c (monitor_load): check the load type and load the file
	accordingly. Default to gr_load_image().
	* monitor.c (monitor_load_ascii_srec): Load an ascii file in
	srecord format by downloading to the monitor.
	* w89k-rom.c, op50n-rom.c: set supported load types.
1994-10-19 03:02:17 +00:00
Rob Savoye 44b95869cf Add a ^C to the init string. 1994-10-19 03:00:29 +00:00
Ian Lance Taylor 294076109f rebuilt dependencies 1994-10-18 21:42:41 +00:00
Ian Lance Taylor 81100e78a3 * ldlex.l: Cast assignment to yy_ch_buf field to char *, not to
YY_CHAR *.
1994-10-18 19:59:52 +00:00
Ian Lance Taylor dfe4400454 * Makefile.in (all-binutils): Depend upon all-byacc. 1994-10-18 19:34:31 +00:00
Ian Lance Taylor 826337108b * configure.in: Don't build emacs on Irix 5. 1994-10-18 19:26:16 +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