Commit Graph

11586 Commits

Author SHA1 Message Date
Stu Grossman
6c27841f3b * corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
remote-adapt.c, remote-e7000.c, remote-eb.c, remote-es.c,
	remote-hms.c, remote-mips.c, remote-mm.c, remote-mon.c,
	remote-nindy.c, remote-os9k.c, remote-pa.c, remote-sim.c,
	remote-st.c, remote-udi.c, remote-vx.c, remote-z8k.c, remote.c,
	w89k-rom.c, target.c, target.h:  Add support for target_stop().
	* gdbtk.c (gdb_stop):  Switch to target_stop().
1994-11-03 22:41:12 +00:00
Stu Grossman
78b459a7e7 * corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
remote-adapt.c, remote-e7000.c, remote-eb.c, remote-es.c,
	remote-hms.c, remote-mips.c, remote-mm.c, remote-mon.c,
	remote-nindy.c, remote-os9k.c, remote-pa.c, remote-sim.c,
	remote-st.c, remote-udi.c, remote-vx.c, remote-z8k.c, remote.c,
	w89k-rom.c, target.c, target.h:  Add support for target_stop().
	* gdbtk.c (gdb_stop):  Switch to target_stop().
	* ChangeLog:  Fix comment to make shebs happy...
1994-11-03 22:40:14 +00:00
Ken Raeburn
dd830c247d add some options to default CC to make bfd & linker compile 1994-11-03 22:29:54 +00:00
Ken Raeburn
15408b3bef Changes from binutils net release:
* Makefile.in (DEVO_SUPPORT): Include configure.bat and makeall.bat.
(DISTDOCDIRS): Add `etc'.
(ETC_SUPPORT_PFX): New variable.
(taz): Include anything from etc starting with a word in ETC_SUPPORT_PFX.
1994-11-03 21:35:37 +00:00
Ian Lance Taylor
71da20b741 * gas/mips/ulh.d, gas/mips/ulw.d, gas/mips/ush.d, gas/mips/usw.d:
Correct test cases.
1994-11-03 20:52:11 +00:00
Ian Lance Taylor
a2c49209cf * config/tc-mips.c (load_address): Fix RELAX_ENCODE arguments for
NO_PIC case.
1994-11-03 20:50:07 +00:00
Peter Schauer
17d347bd60 * osfsolib.c (solib_map_sections, first_link_map_member,
next_link_map_member, xfer_link_map_member):  Retrieve and use
	shared library relocation offset from runtime loader structures.
	Use libxproc.a routines to get a working version if
	USE_LDR_ROUTINES is defined.
	* README:  Remove item about shared library relocation for
	Alpha OSF/1.
1994-11-03 09:27:23 +00:00
Kung Hsu
a8d23c7364 * c-exp.y (yylex): scan template names, and scan nested class
names.
1994-11-02 23:11:47 +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
9cb8eb5c28 * archive.c (normalize): Change to take a BFD as an argument.
Change VMS version to use bfd_alloc rather than malloc, so that we
	don't lose the memory forever.
	(_bfd_construct_extended_name_table): Check the name of an archive
	entry which is not being extended, and correct it if it is wrong.
	This is necessary in case the archive was constructed by another
	program which put an entry in the extended name table which we
	don't plan to put in ourselves.  From jjc@jclark.com (James
	Clark).
	(bfd_dont_truncate_arname): Check return value of normalize.
1994-11-02 20:29:18 +00:00
J.T. Conklin
2f2c0b2a2c * nlm/Makefile.in: install gdbserve.nlm. 1994-11-02 19:04:22 +00:00
Ian Lance Taylor
52329a29a2 * ldctor.c (ldctor_add_set_entry): Don't permit a set to be
composed of different object file formats.
	(ldctor_build_sets): If the output format does not support the
	reloc, and we are not generating a relocateable link, try getting
	the reloc from the input format.
1994-11-02 17:22:28 +00:00
Stu Grossman
cd2df226a7 * Makefile.in: Use $(objdir)/tcl and $(objdir)/tk if they are
available.
	* configure.in (ENABLE_CLIBS):  Use $(TCL) and $(TK) instead of
	-ltcl and -ltk.
	* gdbtk.c:  Get rid of lots of unnecessary #includes.
	* (gdbtk_init):  Use ConnectionNumber macro instead of referencing
	Display structure directly.
	* gdbtk.tcl:  Change exit button to quit button (makes shebs
	happy).
1994-11-02 00:50:12 +00:00
Ian Lance Taylor
da15a93ea1 * config/tc-mips.c (s_change_sec): If not GPOPT, don't permit
switching to the readonly data section.
1994-11-01 22:07:46 +00:00
Ian Lance Taylor
2622a6c256 * ecoff.c (ecoff_directive_type): Fix warning message. 1994-11-01 21:39:38 +00:00
Peter Schauer
c50e36c288 * c-valprint.c (c_value_print): Check for plain literal `char'
target type when suppressing `(char *)' output for strings.
1994-11-01 21:04:11 +00:00
J.T. Conklin
e574ddd43a * Makefile.in (ALL_EMULATIONS): Added em68knbsd.o.
(em68knbsd.c): New target.

* config/m68k-nbsd.mt: New file.
* emulparams/m68knbsd.sh: New file.
* configure.in (m68*-*-netbsd*): Use above configs.
1994-11-01 18:33:35 +00:00
Ian Lance Taylor
b531cfe94e * elf32-hppa.c (ELF32_PARISC_SX_SIZE): Define.
(ELF32_PARISC_SX_GET, ELF32_PARISC_SX_PUT): Define.
	(symextn_entry): Don't define.
	(symext_chain_size): Change type to bfd_size_type.
	(symextn_contents): Change type to bfd_byte *.
	(elf32_hppa_backend_begin_write_processing): Use
	ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).
	(elf32_hppa_size_symext): Likewise.  Also, change type of sizep to
	bfd_size_type *.
	(elf_hppa_tc_make_sections): Cast symextn_contents assignment to
	bfd_byte *.  Use ELF32_PARISC_SX_PUT instead of direct assignment.
	(elf32_hppa_backend_symbol_table_processing): Use
	ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).  Use
	ELF32_PARISC_SX_GET insetad of direct assignment.
	(elf32_hppa_read_symext_info): Change type of contents, and its
	assignment cast, to bfd_byte *.  Use ELF32_PARISC_SX_SIZE instead
	of sizeof (symextn_entry).  Use symext_entryS instead of
	symextn_entry.  Use ELF32_PARISC_SX_GET instead of direct
	assignment.
1994-11-01 04:46:07 +00:00
Stan Shebs
7047c1d1b1 * coffread.c (coff_symfile_init): Remove unused local abfd.
* utils.c [NO_MMALLOC] (mmalloc, mrealloc): Define and use size_t
	instead of long, for compatibility with mmalloc.h.
1994-11-01 03:28:08 +00:00
Ian Lance Taylor
fbf967b0da * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): If we find an
appropriately named static library, stop the search at that
	directory.
1994-11-01 00:37:05 +00:00
Ian Lance Taylor
dded3d1406 * hppa-dis.c (print_insn_hppa): Read the instruction using
bfd_getb32, so that it works on a little endian or 64 bit host.
	Remove unused local variable op.
1994-11-01 00:02:52 +00:00
Ian Lance Taylor
da6c4a8b3c * archive.c (bfd_dont_truncate_arname): Add the ar padding
character, if there is room for it, even if the name is the
	maximum length.
PR 5859.
1994-10-31 20:23:47 +00:00
Ian Lance Taylor
2d2d08ed7b * elfcode.h (assign_file_positions_except_relocs): Sort the ELF
headers by section address when assigning file positions.
	(elf_sort_hdrs): New static function.
1994-10-31 19:21:40 +00:00
Ian Lance Taylor
0d29b6cc9d * lib/ld.exp (default_ld_compile): Remove the output file before
compiling.
1994-10-31 00:05:09 +00:00
Ian Lance Taylor
197e30e560 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Create DT_INIT
and DT_FINI dynamic entries based on the existence of _init and
	_fini symbols, not on the .init and .fini sections.  This is
	compatible with some SVR4 linkers.
	(elf_bfd_final_link): Corresponding change.
1994-10-31 00:04:03 +00:00
Jeff Law
ec11c09cf8 * config/tc-hppa.c (pa_proc): Delete disabled code to put each
proc in its own subspace, we're not going to use it.
1994-10-30 07:00:14 +00:00
Ian Lance Taylor
dd4219176d * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't move a
symbol with a PLT entry into the .plt section if it is defined in
	a regular file.
	* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1994-10-30 03:41:50 +00:00
Ian Lance Taylor
54f16fc4bb * linker.c (_bfd_generic_link_add_archive_symbols): It's not an
error if an empty archive has no symbol table.
	* ecoff.c (ecoff_link_add_archive_symbols): Likewise.
	* elfcode.h (elf_link_add_archive_symbols): Likewise.
1994-10-29 16:20:41 +00:00
Peter Schauer
68906e4c3f * gdb.base/a1-selftest.exp: Remove RS/6000 xfail for backtrace
through signal handler.
1994-10-29 09:58:01 +00:00
Peter Schauer
44761ac746 * config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
Don't test for zero backchain pointer to recognize a signal
	handler frame, if read() gets interrupted by a signal, the
	backchain will be non zero.
	(SIG_FRAME_FP_OFFSET):  Move to here from rs6000-tdep.c,
	improve comment.
	(SIG_FRAME_PC_OFFSET):  New definition.
	(FRAME_SAVED_PC):  Return saved pc from sigcontext if this
	is a signal handler frame.
	* rs6000-tdep.c (function_frame_info):  Do not error out
	if we can't access the instructions.

	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
	New definition to get the function address from a function pointer.
	* valops.c (find_function_addr):  Use it when calling a user
	function through a function pointer.
1994-10-29 09:56:38 +00:00
Peter Schauer
9ed8604f38 * top.c (line_completion_function): Renamed from
symbol_completion_function, takes the line buffer and the
	point in the line buffer as additional arguments.
	(readline_line_completion_function):  New function, interface
	between readline and line_completion_function.
	(init_main):  Use it.
	(complete_command):  Use line_completion_function instead of
	abusing rl_line_buffer. Free completion strings after printing
	them.
	* symtab.c (completion_list_add_name):  Recheck for duplicates
	if we intend to add a modified symbol.

	* gdbtypes.h (cplus_struct_type):  nfn_fields_total no longer
	includes the number of methods from the baseclasses.
	* stabsread.c (attach_fn_fields_to_type):  No longer add the
	number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
	the baseclass type might not have been completely filled in yet.
	* symtab.c (total_number_of_methods):  New function to compute
	the total number of methods for a type, including the methods
	from baseclasses.
	(decode_line_1):  Use it instead of TYPE_NFN_FIELDS_TOTAL to
	allocate the symbol array for find_methods.

	* stabsread.c (scan_file_globals):  Add default case to minimal
	symbol type switch, to avoid gcc -Wall warnings.

	* config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
	Don't test for zero backchain pointer to recognize a signal
	handler frame, if read() gets interrupted by a signal, the
	backchain will be non zero.
	(SIG_FRAME_FP_OFFSET):  Move to here from rs6000-tdep.c,
	improve comment.
	(SIG_FRAME_PC_OFFSET):  New definition.
	(FRAME_SAVED_PC):  Return saved pc from sigcontext if this
	is a signal handler frame.
	* rs6000-tdep.c (function_frame_info):  Do not error out
	if we can't access the instructions.

	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
	New definition to get the function address from a function pointer.
	* valops.c (find_function_addr):  Use it when calling a user
	function through a function pointer.
1994-10-29 09:51:32 +00:00
Stan Shebs
b7966a5adc * Makefile.in (MMALLOC_DIR): New definition.
(MMALLOC): Use MMALLOC_DIR.
	(MMALLOC_CFLAGS): Look in MMALLOC_DIR for mmalloc.h.
	(OPCODES): Remove gratuitous "./".
	* defs.h (mmalloc.h): Include.
	(mmalloc, mrealloc, etc): Remove decls.
	(cplus_demangle, cplus_demangle_opname): Remove decls.
1994-10-29 00:02:51 +00:00
Stan Shebs
18bea424b7 * mmprivate.h: New file, was mmalloc.h.
(mmalloc.h): Include.
	* mmalloc.h: Remove all but declarations of mmalloc functions.
	(ansidecl.h): Include.
	* attach.c, et al: Include mmprivate.h instead of mmalloc.h.
1994-10-28 23:53:29 +00:00
Stan Shebs
3ae8f16858 Really forget all about the old tests dir 1994-10-28 22:45:04 +00:00
J.T. Conklin
ec35a1c2f3 NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
* config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
* configure.in (m68knetbsd_vec): Added.
* targets.c (bfd_m68knetbsd_vec): Added.
* hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
* Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.

miscellaneous cleanup required by all netbsd targets, based on work
by Andrew Cagney <cagney@highland.com.au>:
* netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
  N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed.  Generic a.out
  definitions work.
* i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
  (MY(write_object_contents)): Use NetBSD's magic numbers
1994-10-28 18:11:15 +00:00
Ian Lance Taylor
f9c3e5871e * ld-shared: New directory, with new files to test generating ELF
shared libraries.
1994-10-27 21:33:10 +00:00
Ian Lance Taylor
b5bd927ce5 * lib/ld.exp (default_ld_compile): If the compilation worked, but
no object file was created, check to see if the compiler foolishly
	ignored the -o switch when compiling, and move the resulting
	object if it did.
1994-10-27 21:31:50 +00:00
Ian Lance Taylor
14cac507a8 * libelf.h (struct bfd_elf_section_data): Add field dynindx.
* elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Don't finalize
	the .dynsym, .dynstr or .hash sections until after the backend
	size_dynamic_sections routine, so that it can add dynamic symbols
	if it wants to.
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't define the
	symbol to be in the .plt section when generating a shared library
	if it is a defined symbol.
	* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
	(elf32_sparc_size_dynamic_sections): When generating a shared
	library, allocate space for a dynamic symbol for each output
	section, storing the index in the dynindx field of the ELF section
	data.  Adjust the other dynindx fields to account for this.
	(elf32_sparc_adjust_dynindx): New static function.
	(elf32_sparc_relocate_section): When copying a reloc into a shared
	library, use the original addend as appropriate.  Convert an
	R_SPARC_32 reloc into an R_SPARC_RELATIVE reloc.  Use the dynamic
	symbol index of the output section, not the normal symbol index.
	(elf32_sparc_finish_dynamic_sections): Don't die if a section does
	not exist when setting the value of the dynamic tags.  Write out
	a dynamic symbol for each output section.
1994-10-27 21:25:31 +00:00
Stu Grossman
c51975113d * defs.h, gdbtk.c, main.c, top.c: Change sense and name of
no_windows variable.  Now called use_windows, and defaults to off
	(for compatibility).
1994-10-26 22:45:13 +00:00
Jim Kingdon
62fad389f2 * coffread.c (coff_symtab_read): If we get the address from
target_lookup_symbol, set the section to -2 not SECT_OFF_BSS.
	(coff_symtab_read): Set value and section of symbol that
	process_coff_symbol returns.
1994-10-26 21:50:19 +00:00
J.T. Conklin
32286e08a5 * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o
and esparcnbsd.o; sorted entries.
  (ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets.

* config/netbsd532.mt: Removed.
* emulparams/netbsd532.sh: Removed.

* config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files.
* emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files.
* configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*,
  sparc*-*-netbsd*): Use above configs.
1994-10-26 21:02:02 +00:00
Ian Lance Taylor
cb409b5d9d * config.sub: Update for recent FSF changes. Remove obsolete
h8300hds entry.  Add -windows* and -osx as basic os.  Minor
	spacing changes.
1994-10-26 20:41:39 +00:00
Jason Merrill
f38cb0962d Add libstdc++ 1994-10-26 19:37:54 +00:00
Ian Lance Taylor
875e471661 * aoutx.h (aout_link_input_section): Don't bother to read or write
the relocs if there aren't any.
1994-10-26 05:17:08 +00:00
David Edelsohn
7c71fc399d Add support for arc processor. 1994-10-26 03:18:14 +00:00
Ian Lance Taylor
94b68f040c * config/tc-mips.c (macro): Ensure that mips2 case of M_LI_DD in
.rdata does not become a variant frag.
1994-10-25 21:24:02 +00:00
Ian Lance Taylor
cd4b8926ce * mips-opc.c: Use or instead of addu for pseudo-op move, since
addu does not work correctly if -mips3.
PR 5832.
1994-10-25 21:09:08 +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
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