Commit Graph

8261 Commits

Author SHA1 Message Date
Ian Lance Taylor 8d12f138ea * ecofflink.c: New file to hold ECOFF debug information linking
routines.
	* ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
	ecoff_add_string, ecoff_get_debug): Removed.  Functionality now in
	ecofflink.c.
	(ecoff_get_extr, ecoff_set_index): New functions.
	(ecoff_slurp_symbolic_info): Don't save raw_size.
	(ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
	(ecoff_compute_section_file_positions): Don't set EXEC_P just
	because there is a start address.
	(ecoff_write_object_contents): Handle external symbols here.  Use
	ecofflink.c functions to write out debugging information.
	* elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
	mips_elf_set_index): New functions.
	(mips_elf_seclet_link): Discard empty sections, the .options
	section and .gptab sections.  Handle linking .mdebug section.
	* libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
	* libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
	* bfd-in.h: Added prototypes for routines in ecofflink.c (some are
	called by gas, so they are public).
	* bfd-in2.h: Rebuilt.
	* Makefile.in (BFD_LIBS): Added ecofflink.o.
	(CFILES): Added ecofflink.c.
	(ecofflink.o): New target.  Rebuilt dependencies.
1993-11-24 07:21:28 +00:00
Ian Lance Taylor 71efdf833f New file to hold ECOFF linking routines used by both ECOFF and MIPS ELF. 1993-11-24 07:18:44 +00:00
Jeffrey Osier 5b0ba16d41 * binutils.texi: fix bug in nlmconv doc 1993-11-23 22:39:01 +00:00
Steve Chamberlain ceeca31c76 Split ChangeLog into two. 1993-11-23 08:06:20 +00:00
Steve Chamberlain e8437082be * remote-e7000.c (e7000_wait): Cope with H8/300 register dump.
* config/h8300/h8300hms.mt: Add remote-e7000.
1993-11-23 07:49:49 +00:00
Jeff Law abb324b2c9 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
a valid magic number if it's been defined.
1993-11-23 06:27:45 +00:00
Peter Schauer 09305cbdfc * gdb.stabs/ecoff.mt: Delete alpha specific if block, fix typo.
* gdb.stabs/ecoff.sed:  Escape inserted blanks with backslashes, embed
	.stabs directives in comments.
1993-11-22 21:26:36 +00:00
Ian Lance Taylor 8f45f60421 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
no longer requires it.
	(ecoff_bfd_seclet_link, ecoff_sizeof_headers,
	ecoff_write_object_contents): Don't treat .scommon section
	specially
1993-11-22 19:22:23 +00:00
Fred Fish abab73c4dd * gdb/config/m88k/delta88.mh (NATDEPFILES): Added corelow.o and
coredep.o to this list.
	* gdb/m88k-nat.c (m88k_register_u_addr):  Avoid error when passed
	the number for an M88110 extended register by just returning the
	address of r0.
1993-11-22 19:08:33 +00:00
Fred Fish c236d8b3a5 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
* bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
	* bfd/ptrace-core.c:  New file for dealing with core files with
	start with the ptrace_user structure found on BCS compliant systems.
	* bfd/targets.c (ptrace_core_vec):  New vector.
1993-11-22 19:01:55 +00:00
Jeff Law 36456a67f8 * Minimal support for reading SOM fixup streams. Allows
objdump -r to do something reasonable.
        * som.c (som_get_reloc_upper_bound): Implement.
        (som_canonicalize_reloc): Implement.
        (som_set_reloc_info, som_slurp_reloc_table): New functions.
1993-11-22 10:37:02 +00:00
Jeff Law cd4d802bbb * gas/hppa/reloc/reloc.exp: Minor fixes so that SOM & ELF can
share the same test code.
        * gas/hppa/reloc/relocreduce.s: Likewise.
1993-11-22 07:28:08 +00:00
Jeff Law 4a1781156b * gas/hppa/basic/fmem.s: Add quadword FP store instructions.
* gas/hppa/basic/basic.exp: Test quadword FP store instructions.
1993-11-22 06:14:24 +00:00
Jeff Law 29249b4271 Add stabs.c to things-to-keep. 1993-11-22 06:04:32 +00:00
Ken Raeburn c60af619fb Modified to be based on lynx.h, like i386 and m68k versions. 1993-11-21 21:29:46 +00:00
Ken Raeburn 196f097043 define FPRINTF_ALREADY_DECLARED 1993-11-21 21:28:01 +00:00
Fred Fish d8b8343dc7 * go32-xdep.c (re_comp, re_exec): Remove stubs now that gdb
always uses it's own version of regex.
1993-11-20 17:22:28 +00:00
Kung Hsu f68fd5c0b0 Modified Files:
ChangeLog valops.c symtab.c

        * valops.c(value_struct_elt_for_reference): enhance  search operator in
        c++.
        * symtab.c(decode_line_1): same as above.
1993-11-20 02:28:03 +00:00
Ian Lance Taylor e0209756f8 * config/obj-coffbfd.c: Use PARAMS rather than EXFUN.
(yank_symbols): Don't call S_SET_EXTERNAL if the storage class is
	already set.  Fixes .def var; .val external_var; .scl 3; .endef.
	(adjust_stab_section): Make static.  Declare return type.  Remove
	unused variables.

	* config/tc-i386.h: Declare tc_coff_fix2rtype and
	tc_coff_sizemachdep.
1993-11-19 21:37:50 +00:00
Jim Kingdon dbdf5a2a04 * symtab.c (decode_line_1): Add comment about use of
return_to_top_level directly instead of error.  Add comment saying
	that the '' should not be needed--that the completer should be fixed.
1993-11-19 21:16:16 +00:00
Jeffrey Osier 4961ce5b9c binutils.texi: minor fix for nlmconv chapter 1993-11-19 21:12:49 +00:00
Jim Kingdon d910c7e938 * TODO: New file, describing tests we could write.
* gdb.t09/corefile.exp: Move description of tests to write to TODO.
1993-11-19 20:24:02 +00:00
Jim Kingdon b0f4ec40fc * TODO: New file, describing tests we could write.
* gdb.t06/corefile.exp: Move description of tests to write to TODO.
1993-11-19 20:22:34 +00:00
Ken Raeburn 0669e04793 sparc-coff related changes 1993-11-19 20:04:07 +00:00
Ian Lance Taylor 533af0314f * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
signed_value before sign extending it.  Don't subtract out
	reloc_entry->address.  This makes it compatible with what gas is
	generating.

Fixes PR 3790.
1993-11-19 19:51:52 +00:00
Ian Lance Taylor a1bff336ec * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
SHT_NOBITS sections.
	(map_program_segments): Don't leave the loop after the first
	SHT_NOBITS section.
	(assign_file_positions_except_relocs): Only force sh_offset and
	sh_addr to match modulo maxpagesize for a section which is not
	SHT_NOBITS.  Changed the method used to force page alignment after
	a SHT_NOBITS section to only do it for the last such consecutive
	section, and to really force page alignment.
1993-11-19 19:41:49 +00:00
Ian Lance Taylor 2332114c71 * configure.in (mips*-sgi-irix5*): New target. Use mipsb-elf32.
* emulparams/elf32mipsb.sh (DATA_ADDR): Define.
	(OTHER_READONLY_SECTIONS): Define for .reginfo.
	(EXECUTABLE_SYMBOLS): Define for _DYNAMIC_LINK.
	* scripttempl/elf.sc: Use EXECUTABLE_SYMBOLS when not relocating.
	Move OTHER_READONLY_SECTIONS after all the other readonly
	sections.  Don't use DATA_ADDR twice.
1993-11-19 19:31:51 +00:00
Ian Lance Taylor 973e421e67 * ldmain.c (enter_file_symbols): Removed duplicate tests of p. If
p is in a common section, make sure the BFD has a section of that
	name.
1993-11-19 19:29:49 +00:00
Ken Raeburn 4c01d9b5be * coffcode.h (coff_slurp_symbol_table): Print more verbose message
in the case of an unknown (or unhandled) storage class.
1993-11-19 19:17:14 +00:00
Kung Hsu 7e6deb7a27 Modified Files:
ChangeLog symtab.c

        * symtab.c(decode_line_1): fix the inconsistency of setting
        breakpoint with '' or without them. The '' is needed when you
        want name completion.
1993-11-19 19:13:41 +00:00
Jim Kingdon 1562fc8325 New file, for known lacks in testsuite 1993-11-19 17:20:18 +00:00
Ken Raeburn 96be1f522f recent coff/lynx changes 1993-11-19 17:00:07 +00:00
Ken Raeburn ab31ae5384 (coff_bfd_reloc_type_lookup): Don't define if already defined.
(coff_slurp_line_table): Reformatted.
1993-11-19 16:30:08 +00:00
Ken Raeburn a179597c4e sparc.h (RELSZ): Use correct value. 1993-11-19 16:23:37 +00:00
Ian Lance Taylor 5f6efd5a5e Get ECOFF gas to work again after this morning's checkins. 1993-11-18 21:00:19 +00:00
Ian Lance Taylor 29cc5816c5 Various entries. 1993-11-18 19:10:20 +00:00
Ian Lance Taylor 0dd2d296fc * config/tc-mips.c: Check ECOFF_DEBUGGING rather than
OBJ_ECOFF in many cases.
	(mips_any_noreorder): New variable.
	(mips_cprestore_offset): Initialize to -1.
	(mips_frame_reg): New variable.
	(RELAX_ENCODE, RELAX_OLD, RELAX_NEW, RELAX_RELOC1,
	RELAX_RELOC2, RELAX_RELOC3, RELAX_WARN): New macros.
	(md_pseudo_table): Handle "gpword" and "cpadd".
	(md_begin): Initialize ok to false.  If OBJ_ELF, set alignment
	of text, data and bss sections to 4.  Set alignment of
	.reginfo section to 2.  If ECOFF_DEBUGGING, create .mdebug
	section.
	(ALIGN_ERR, ALIGN_ERR2): Removed unused and useless alignment
	check.
	(append_insn, macro_build, macro_build_lui): Take place
	argument.  Changed all callers.
	(append_insn): If appending a nop, don't emit one.
	(macro_build): Changed assertion for 'i', 'j', 'o' case.
	(gp_reference): Removed.
	(load_address): New function.
	(macro): If mips_noreorder is used, set mips_any_noreorder.
	Extensive changes to handle GP and PIC symbols differently.
	Build both possible code choices using a variant frag, and
	make a final decision at the end of assembly when all
	information is known.  Added PIC support for all symbol
	references.
	(mips_ip): Don't permit anything but a number after $ for a
	coprocessor register.  Don't use .lit4 or .lit8 sections when
	generating PIC code.  If OBJ_ELF, set alignment of .lit4 or
	.lit8 section to 4.
	(md_apply_fix): Accept and ignore GOT16 and GPREL32 relocs.
	(s_change_sec): Set alignment of ELF .rodata or .sdata section
	to 4.
	(s_mipsset): If .set noreorder, set mips_any_noreorder.
	(s_cpload): Ignore .cpload if not generating PIC code.  Warn
	if .cpload is not in noreorder section.
	(s_cprestore): Ignore .cprestore if not generating PIC code.
	(s_gpword, s_cpadd): New functions.
	(tc_get_register): Added frame argument; if true, set
	mips_frame_reg to return value.  Changed all callers.
	(md_estimate_size_before_relax): Don't error out, but instead
	determine how much a frag should grow.
	(tc_gen_reloc): Return multiple relocs if appropriate, as
	determined by md_estimate_size_before_relax.
	(md_convert_frag): New function.
	(mips_elf_final_processing): Set ELF header flags based on
	mips_any_noreorder and mips_pic.
	* config/tc-mips.h (RELOC_EXPANSION_POSSIBLE): Define.
	(MAX_RELOC_EXPANSION): Define to be 3.
	(md_relax_frag): Define to be 0.
	(md_convert_frag): Don't define.
	(tc_get_register): Changed declaration.
1993-11-18 18:56:31 +00:00
Kung Hsu 6ebc9cddfc Modified Files:
ChangeLog valops.c

        * valops.c(search_struct_method): to use unified search so type
	conversion operator works in calling method. (this file should be
	checked in with last commit, I missed it).
1993-11-18 18:54:11 +00:00
Ian Lance Taylor f8944f8414 Various entries. 1993-11-18 17:24:53 +00:00
Ian Lance Taylor 062189c6ea * elfcode.h (bfd_section_from_shdr): Don't dump core if target
section has no ELF section data.
	(elf_make_sections): Set addralign of reloc section to 4.
	(elf_fake_sections): Likewise.
	(map_program_segments):	Don't consider section 0.
	(assign_file_positions_except_relocs): Don't consider section 0.
	In the main loop, skip the symtab and strtab sections, since their
	positions are set elsewhere.
	(swap_out_syms): Set addralign of symtab section to 4.  Set
	addralign of strtab sections to 1.
	(assign_file_positions_for_relocs): Don't consider section 0.
	(write_object_contents): Don't write out section 0.
	(sym_is_global): Take abfd argument.  Call
	elf_backend_sym_is_global if it is not NULL.
	(elf_map_symbols): Pass abfd to sym_is_global.
	(write_object_contents): Call elf_backend_final_write_processing
	if it is defined.
1993-11-18 17:12:47 +00:00
Ian Lance Taylor 643e9fc768 * libelf.h (struct elf_backend_data): Added fields
elf_backend_sym_is_global and elf_backend_final_write_processing.
	* elf32-target.h (elf32_bed): Added corresponding initializers.
	* elf64-target.h (elf64_bed): Likewise.
1993-11-18 17:10:42 +00:00
Fred Fish 7855533586 Fix for PR 3978:
* valprint.c (val_print_string):  When looking for a null
	terminator compare current bufsize to fetchlimit to determine
	when to stop, instead of computing buffer+fetchlimit which
	may overflow for very large limits (like "unlimited").
1993-11-18 16:34:43 +00:00
Kung Hsu 4f65eece26 Modified Files:
ChangeLog eval.c valarith.c

        * eval.c(evaluate_subexp): to use unified search so type conversion
        operator works in calling method.
        * valarith.c(value_x_binop, value_x_unop): same as above.
1993-11-18 02:30:33 +00:00
Ian Lance Taylor c9668c588a * libecoff.h: Include coff/ecoff.h.
(struct ecoff_backend_data): Move external debugging information
	fields into a single field pointing to an ecoff_debug_swap
	structure.
	(ecoff_data_type): Move debugging information fields into a single
	field pointing to an ecoff_debug_info structure.
	* coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
1993-11-18 00:07:33 +00:00
Ian Lance Taylor 4f09de58cd * mipsread.c: Change use of ECOFF information to correspond to
changes in bfd/libecoff.h.
	(mipscoff_symfile_offsets): Made static.
1993-11-17 23:58:46 +00:00
Ian Lance Taylor 00f4e65966 * configure.in (mips-*-irix5*): New target. Use elf and mips-big. 1993-11-17 23:26:43 +00:00
Ian Lance Taylor 9cc8106c47 * Makefile.in (REAL_SOURCES): Added ecoff.c.
(REAL_HEADERS): Added ecoff.h.
	(OBJS): Added ecoff.o.
	(ecoff.o): New target.
1993-11-17 23:25:35 +00:00
Stan Shebs 55ff7aef7e Wed Nov 17 13:56:10 1993 Stan Shebs (shebs@rtl.cygnus.com)
* i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
	garbage bits appearing in the upper end of symbolnums.

	* config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
1993-11-17 23:25:23 +00:00
Ian Lance Taylor 9faec336f4 New files for ECOFF debugging split out of config/obj-ecoff.c. 1993-11-17 23:23:39 +00:00
Ian Lance Taylor a58374d72a * write.c (is_dnrange): Do not define if md_relax_frag is defined.
(relax_segment): If md_relax_frag is defined, use it to handle a
	frag of type rs_machine_dependent rather than looking through
	md_relax_table.

	* write.c (relax_and_size_seg): Don't set SEC_HAS_CONTENTS for a
	bss section.  Set SEC_RELOC if there are any relocations, even for
	a zero size section.

	* write.c (write_relocs): In RELOC_EXPANSION_POSSIBLE case, based
	data offset on reloc[0]->address rather than reloc[j]->address, so
	that multiple relocs can affect different memory locations.

	* write.c (chain_frchains_together, relax_and_size_seg,
	adjust_reloc_syms, write_relocs): Make third argument PTR, not
	char *, to match definition of bfd_map_over_sections.
1993-11-17 23:06:12 +00:00