Commit Graph

11573 Commits

Author SHA1 Message Date
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
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