Commit Graph

10835 Commits

Author SHA1 Message Date
Ian Lance Taylor 30e5ad97e9 * elfcode.h (elf_adjust_dynamic_symbol): Correct weak symbol
handling again.
1994-08-01 20:53:48 +00:00
Kung Hsu 5a04f7d16c Modified Files:
stabsread.c ChangeLog

        * stabsread.c (read_type): Fix a bug in enum size calculation.
1994-08-01 20:41:11 +00:00
Jeff Law fbf718862a * config/tc-hppa.c (create_new_space): Initialize sd_subspaces
field in the space chain.
1994-08-01 20:12:41 +00:00
Ian Lance Taylor a1ed243577 * scripttempl/mips.sc: Redo script to set . outside of sections
and not bother to explicitly specify section addresses.
1994-08-01 19:55:21 +00:00
Ian Lance Taylor f3817a52e5 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
* hosts/solaris2.h: Remove.
	* config/solaris2.mh: Remove.
1994-08-01 16:35:40 +00:00
Ian Lance Taylor d510fd893a * elfcode.h (elf_slurp_reloc_table): Don't try to read the relocs
if there aren't any.
1994-08-01 16:34:09 +00:00
Ian Lance Taylor abc61566c0 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
* hosts/solaris2.h: Remove.
	* config/solaris2.mh: Remove.
1994-08-01 16:16:47 +00:00
Jeff Law f81eee9deb * hppa-tdep.c (compare_unwind_entries): Add "const" to both
argument types to shut up GCC.
1994-08-01 08:46:51 +00:00
Jeff Law 363d615082 * config/tc-hppa.c (tc_gen_reloc): Cast return value from
hppa_gen_reloc_type.
1994-08-01 08:46:08 +00:00
Jeff Law 907f11fe71 * config/tc-hppa.c (tc_gen_reloc): Cast return value from
hppa_gen_reloc_type.
1994-08-01 08:44:02 +00:00
Jeff Law edd86fb0da * hppa-tdep.c (saved_pc_after_call): If the saved PC is in a
linker stub, then return the address the stub will return to.
	(frame_saved_pc): Correctly restart the search for the saved
	pc when a linker stub is encountered.

	* hppa-tdep.c (inst_saves_gr): Handle 16 and 8 bit instruction
	register stores emitted by the version 9 HP compilers.
	(inst_saves_fr): Relax test for a specific base register (%r1);
	this avoids losing with the version 9 HP compilers.
	(skip_prologue): Try to skip argument stores emitted by the HP
	compilers.  It's not perfect, but it's better than before.
1994-08-01 07:49:59 +00:00
Jeff Law 58bbba79a2 * elf32-hppa.c, elf32-hppa.h: Update comment reflecting which
HPPA ELF spec the code implements.
1994-07-31 20:29:19 +00:00
Stu Grossman 43b2064196 * findvar.c (write_pc write_pc_pid): Remove casts to long when
calling write_register_pid.
	* (write_register_pid):  Add prototype.
1994-07-30 06:23:58 +00:00
Steve Chamberlain 205fc02b50 * remote.c (read_frame): Split readchar/checksum calculation into
two parts since evaluation order is undefined.
1994-07-30 05:04:03 +00:00
Fred Fish 0c18c7370b From Kevin A. Buettner (kev@cujo.geg.mot.com).
* Makefile.in (coredep.o):  Add inferior.h as dependency.
	* inflow.c:  Add F_SETOWN to list of defines to check
	around code that uses F_SETOWN.
1994-07-29 21:04:27 +00:00
Stu Grossman 8cb35771db Keep gdbtk.c and gdbtk.tcl. 1994-07-29 18:08:50 +00:00
J.T. Conklin 998b321b93 * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): If using newlib,
set the -L and -B directory prefixes so we can link with it.
1994-07-29 17:08:25 +00:00
J.T. Conklin b933a608ed Obsolete file. 1994-07-29 00:41:04 +00:00
Ken Raeburn c4396c87e9 * sparc-dis.c (print_insn_sparc): Handle new operand type 'x'.
* sparc-opc.c: Added sparclite extended FP operations, and versions of v9
impdep* instructions permitting specification of the OPF field.
1994-07-28 23:46:19 +00:00
Ken Raeburn f2c42ba402 update doc for sparclite 934 opcode table changes 1994-07-28 23:42:55 +00:00
Ken Raeburn 5e0a90a8d7 * tc-sparc.c (sparc_ip): Check more carefully for conflicting architectures.
(md_parse_option) [NO_V9]: Complain if v9 was selected.
(md_show_usage): Derive architecture list in usage message from
architecture_pname array.
(cypress): Macro deleted.
(op_hash): Don't initialize.
(s_common): Use bfd_und_section_ptr instead of bfd_und_section.
(BSR): New function.
(sparc_ip): Use it for right-shift operations of 32 bits or more.
(sparc_ip): Implement new operand type 'x'.
1994-07-28 23:36:16 +00:00
J.T. Conklin af1fa5e7ca * config/mt-slite (LDFLAGS): If using the newlib in the tree, set
the -B and -L prefixes so we can find the debugging stub.
1994-07-28 23:00:42 +00:00
Stu Grossman 754e5da26e * Makefile.in (INSTALLED_LIBS, CLIBS, DEPFILES): Add support for
--enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
	where appropriate.

	* General hackery to support alternate user-interface.
	* breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
	disable_breakpoint):  Call hooks for alternate user-interface.
	* defs.h:  Add declarations for alternate user-interface hooks.
	* main.c (main):  Add --nw (and --nowindows) options to disable
	the GUI.
	* (near call to command_loop):  Call command_loop_hook if set.
	* (fputs_unfiltered):  Call fputs_unfiltered_hook if set.
	* stack.c:  Call print_frame_info_listing_hook if set.
	* top.c (gdb_init):  Initialize targets.c and utils.c prior to
	other files to make sure that calls to error and warning will
	work.  Call init_ui_hook after everything else.
	* utils.c (query):  Call query_hook if set.
	* (gdb_flush):  Call flush_hook if set.
	* Change _initialize_utils to initialize_utils cuz we don't use
	automatic initialization of utils.c anymore.

	* Support for TK GUI.
	* Makefile.in:  Add rule for gdbtk.o.
	* configure.in:  Add support for --enable-gdbtk.
	* gdbtk.c:  New file.  Contains support routines for TK interface.
	* gdbtk.tcl:  New file.  Implements GUI policy.

	* remote.c:  Get rid of #ifdef DONT_USE_REMOTE.  It's no longer
	necessary.
1994-07-28 22:07:02 +00:00
J.T. Conklin b98612f1fd * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Use newlib if it is
there and we are using the gcc from the tree.
  (LD_FOR_TARGET): Look for ld in ../ld/ld.new.
1994-07-28 21:57:31 +00:00
J.T. Conklin d18245ea9a Fix typo 1994-07-28 21:33:56 +00:00
J.T. Conklin c2926ab7fc * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Use newlib if it is
there and we are using the gcc from the tree.

* gdb.base/types.c: Removed.
1994-07-28 21:23:28 +00:00
J.T. Conklin 9f70e45075 * gdb.base/configure.in: Look for makefile fragments in ../config.
Recognize i386-*-netware.
* gdb.c++/configure.in: Likewise.
1994-07-28 20:38:45 +00:00
Fred Fish 8aa8690c8b * Makefile.in (annotate.o): Add dependencies. 1994-07-28 18:24:07 +00:00
J.T. Conklin ff59855b7d * sparclite/aload.c: Added new -q (quiet) option.
return 0 exit status if file was successfully downloaded.
1994-07-28 01:33:45 +00:00
J.T. Conklin 1e47d512c5 * nlm/gdbserve.c: merge in command line argument parsing changes
and bug fixes made to i386-nlmstub.c.
1994-07-27 22:05:46 +00:00
J.T. Conklin e356aae315 * i386-nlmstub.c: The returnLength field must be initialized
before portConfig is passed to AIOGetPortConfiguration.
  Compare command line arguments with strnicmp(); args are
  case insensitive on netware.
1994-07-27 21:46:06 +00:00
Karen Christiansen 323f277ffc add hp700 -x- m68k-coff for DSC 1994-07-27 18:23:43 +00:00
Fred Fish de19d1ed53 * Makefile.in (DISTSTUFF): Add definition.
(diststuff):  Add for new distribution support.
	(gdb.tar.Z, make-proto-gdb.dir, setup-to-dist,
	gdb-$(VERSION).tar.Z, make-proto-gdb-1, make-proto-testsuite.dir):
	Remove old distribution building rules, now uses standard
	distribution support in parent directory Makefile.in.
1994-07-27 16:32:01 +00:00
Fred Fish 0a127a3eb6 * Makefile.in (GDB_SUPPORT_FILES): Remove
(setup-dirs-gdb, gdb.tar.gz, make-gdb.tar.gz):  Remove old rules.
	(gdb.tar.gz): Add new rule to use standard distribution building
	mechanism.

	(Also, changed taz rule to abort building of unsanitary
	distributions - not recorded in ChangeLog)
1994-07-27 16:18:17 +00:00
Jim Kingdon f6d5d0061c * target.c (push_target): Cast result from xmalloc. 1994-07-27 05:10:52 +00:00
Stan Shebs beb773f39f * gdbint.texinfo: Removed mentions of many obsolete conditionals,
described or fixed the descriptions of many others.
1994-07-27 01:35:46 +00:00
Ken Raeburn 10db66ecfd I80960XL support (sanitized), misc cleanup:
* config/tc-i960.h (TC_COFF_SET_MACHINE): New macro.  Calls tc_headers_hook.

* config/tc-i960.c (targ_has_iclass): Use I_CX | I_CX2 where I_CX was used
previously.
(tc_headers_hook): If I_CX2 is found, set flags to F_I960CA.

* config/tc-i960.c (po_hash): Declaration deleted.
(next_object_file_charP): Ditto.
(regnames, aregs, coj): Now const.
(parse_memop): Static array def_scale now const.
(md_begin): Cast away const when passing hash routines addresses of values in
regnames or aregs.
(md_longopts): Added "link-relax" and "no-relax" hyphenated forms.  Continue to
accept one-word forms.
(struct tabentry, arch_tab): Moved to top level from inside md_parse_option.
Now const.
(md_show_usage): Use arch_tab to generate usage message.  Print hyphenated
forms of relax options.

* config/tc-i960.h (DEFINE_I960_AOUT, TC_S_IS_*, TC_S_*_SYSPROC,
TC_S_FORCE_TO_*): Moved from here...
* config/tc-i960.c: ... to here.  Changed DEFINE_I960_AOUT stuff to test
OBJ_AOUT and OBJ_BOUT directly.

* config/tc-i960.h (CTRL, COBR, COJ, REG, MEM*, FBRA, CALLJ, M1-M3, REG_OPC,
R_*, SFR, LIT, FP, OP, R, RS, RL, RSL, F, {R,F}{,L}{2,4}, M, SFR_OK, LIT_OK,
FP_OK, REG_ALIGN, MEMOP, I_*): Macros deleted.

* config/tc-i960.c (ARCH_XL): Define.
(arch_tab): Include XL.
(targ_has_sfr, targ_has_iclass): Handle XL.
(tc_headers_hook): Set flags to F_I960XL for i960XL.
1994-07-27 00:58:19 +00:00
Ken Raeburn 39792caf99 Some bits of COFF cleanup, and i960-coff support:
* config/obj-coff.h: Moved common includes and TARGET_FORMAT definitions
together.
(WORKING_DOT_WORD, WARN_SIGNED_OVERFLOW_WORD, OBJ_COFF_OMIT_OPTIONAL_HEADER,
BFD_HEADERS, BFD) [!BFD_ASSEMBLER]: Moved these definitions to the start of the
file, before the includes.
(SYMBOLS_NEED_BACKPOINTERS, OBJ_COFF_MAX_AUXENTRIES): Always define these.
(S_GET_ZEROES): Deleted.
(S_SET_ZEROES): Moved to obj-coff.c.

* config/obj-coff.c (obj_coff_* psuedo-op fns): Deleted forward declarations.
(obj_pseudo_table): Moved to one version end of file, conditionalized
internally.
(stack typedef, stack_init, stack_delete, stack_push, stack_pop, tag_hash,
tag_init, tag_insert, tag_find, tag_find_or_make): Moved to one combined
version at top of file, unconditional.  Deleted forward declarations.
(s_get_name): Moved one copy of declarations to start of file.
(def_symbol_in_progress): Ditto.  Don't initialize.
(S_SET_ZEROES): Moved here from obj-coff.h.
(write_object_file): If TC_COFF_SET_MACHINE is defined, call it on the file
headers.

* config/obj-coff.c (seg_info_off_by_4): Now const and static.
(SEG_INFO_FROM_SEG_NUMBER): Unused macro deleted.
(previous_file_symbol, def_symbol_in_progress, symbol_externP,
symbol_extern_lastP, last_functionP) [!BFD_ASSEMBLER]: Don't bother explicitly
initializing to zero value.

* config/obj-coff.c (fixup_segment) [TC_I960]: Use SF_GET_BALNAME and
SF_GET_CALLNAME instead of the TC_S_IS_ versions.
1994-07-27 00:37:46 +00:00
Ken Raeburn b5b056fc38 i960xl changes (sanitized) 1994-07-27 00:21:43 +00:00
Ken Raeburn ffeef0bbcb (howto_rellong, howto_iprmed, howto_optcall): Use HOWTO macro. 1994-07-27 00:11:56 +00:00
Ken Raeburn e26e4fbc0b i960xl sanitization; keep some more ns32k related files 1994-07-27 00:10:18 +00:00
Ken Raeburn 2a097d73b7 i960xl changes (sanitized); keep ns32k-dis.c 1994-07-26 23:13:34 +00:00
Ken Raeburn b55701fa46 i960xl support (sanitized) 1994-07-26 23:07:08 +00:00
Ken Raeburn c5b34aeeda i960xl opcode table changes (sanitized) 1994-07-26 23:06:41 +00:00
Stan Shebs d54b2c5069 Tue Jul 26 18:20:46 1994 Paul Flinders (ptf@smee)
* elfread.c (elf_symtab_read): Discard compiler labels generated
	by the Solaris 2.1/Intel SunPro compiler.
1994-07-26 22:22:38 +00:00
Ken Raeburn f68880ead9 ns32k files; i960xl sanitization 1994-07-26 22:20:48 +00:00
Ian Lance Taylor 9a402d7ac5 * elfcode.h (elf_adjust_dynamic_symbol): When handling a weak
symbol, correct check to see whether the equivalent normal symbol
	was referenced.
1994-07-26 19:34:14 +00:00
Ian Lance Taylor 374d2ef905 Add support for creating shared libraries under i386 ELF and SPARC
ELF.  Based on patches by Eric Youngdale <ericy@cais.cais.com>.
	* libelf.h (struct elf_link_hash_entry): Remove copy_offset field.
	Add got_offset and plt_offset fields.
	(ELF_LINK_HASH_REF_DYNAMIC_MULTIPLE): Don't define.
	(ELF_LINK_HASH_DEF_DYNAMIC_MULTIPLE): Don't define.
	(ELF_LINK_HASH_NEEDS_COPY): Define.
	(struct elf_backend_data): Add check_relocs field.
	(struct bfd_elf_section_data): Change relocs from PTR to
	Elf_Internal_Rela *.
	(struct elf_obj_tdata): Add local_got_offsets field.
	(elf_local_got_offsets): Define accessor macro.
	(bfd_elf32_link_create_dynamic_sections): Declare.
	(bfd_elf32_link_record_dynamic_symbol): Declare.
	(bfd_elf64_link_create_dynamic_sections): Declare.
	(bfd_elf64_link_record_dynamic_symbol): Declare.
	* elfcode.h (elf_slurp_reloc_table): Don't use the section data
	relocs field.
	(elf_link_record_dynamic_symbol): Make globally visible.  Use
	macro to rename to NAME(bfd_elf,link_record_dynamic_symbol).
	(elf_link_add_object_symbols): If creating a shared library, put
	make all local symbols dynamic.  Don't bother with the
	DYNAMIC_MULTIPLE flags.  Call the check_relocs backend function if
	it is defined.
	(elf_link_create_dynamic_sections): Make globally visible.  Use
	macro to rename to NAME(bfd_elf,link_create_dynamic_sections).  If
	creating a shared library, make sure that _DYNAMIC is added as a
	dynamic symbol.
	(elf_link_read_relocs): New function.
	(NAME(bfd_elf,record_link_assignment)): If creating a shared
	library, always create symbols, and always make them dynamic.
	(elf_bfd_final_link): Permit creation of shared libraries.
	(elf_link_input_bfd): Use elf_link_read_relocs to get the relocs.
	* elf.c (_bfd_elf_link_hash_newfunc): Don't initialize
	copy_offset.  Initialize got_offset and plt_offset.
	* elf32-target.h (elf_backend_check_relocs): Define as 0 if not
	defined.
	(elf32_bed): Initialize check_relocs field.
	* elf64-target.h (elf_backend_check_relocs): Define as 0 if not
	defined.
	(elf64_bed): Initialize check_relocs field.
	* elf32-i386.c (elf_howto_table): Change R_386_PLT32 and
	R_386_GOTPC to be pc_relative and pcrel_offset.
	(elf_i386_pic_plt0_entry): Define.
	(elf_i386_pic_plt_entry): Define.
	(elf_i386_create_dynamic_sections): Create a .got.plt section, and
	define _GLOBAL_OFFSET_TABLE_ at the start of it.  If creating a
	shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
	dynamic symbol.  Don't create .rel.bss if creating a shared
	library.
	(elf_i386_check_relocs): New function.
	(elf_i386_adjust_dynamic_symbol): Don't make a PLT entry if the
	symbol already has one.  When making a PLT entry, set plt_offset.
	Don't create a copy reloc when creating a shared library.  Don't
	set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
	(elf_i386_allocate_dynamic_section): Remove.
	(elf_i386_size_dynamic_sections): Look through all the sections
	rather than assuming we know their names.  Remove any empty reloc
	or plt sections.  Only add a DT_DEBUG entry if not creating a
	shared library.  Only add a DT_PLTGOT entry if there is a PLT.
	Add a DT_TEXTREL entry if required.
	(elf_i386_relocate_section): Permit undefined symbols when
	creating a shared library.  Handle the special relocation types
	specially.
	(elf_i386_finish_dynamic_symbol): Create a PLT entry if plt_offset
	is set.  If creating a shared library, produce a PIC PLT entry.
	Only mark a PLT symbol as undefined if it was not defined by a
	regular object file.  Create a GOT entry if got_offset is set.
	Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
	(elf_i386_finish_dynamic_sections): Change the handling of
	DT_RELSZ to simply subtract out the size of .rel.plt.  If creating
	a shared library, produce PIC PLT code.
	(elf_backend_check_relocs): Define.
	* elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT10,
	R_SPARC_GOT22, and R_SPARC_PC10 to not warn about reloc overflow.
	(elf32_sparc_create_dynamic_sections): If creating a shared
	library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
        dynamic symbol, and set the type to STT_OBJECT.  Likewise for
        _PROCEDURE_LINKAGE_TABLE_.  Don't create .rel.bss if creating a
        shared library.
	(elf32_sparc_check_relocs): New function.
	(elf32_sparc_adjust_dynamic_symbol): Don't make a PLT entry if the
	symbol already has one.  When making a PLT entry, set plt_offset.
	Don't create a copy reloc when creating a shared library.  Don't
	set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
	(elf32_sparc_allocate_dynamic_section): Remove.
	(elf32_sparc_size_dynamic_sections): Look through all the sections
	rather than assuming we know their names.  Only add a DT_DEBUG
	entry if not creating a shared library.  Add a DT_TEXTREL entry if
	required.
	(elf32_sparc_relocate_section): Permit undefined symbols when
	creating a shared library.  Handle the special relocation types
	specially.
	(elf32_sparc_finish_dynamic_symbol): Create a PLT entry if plt_offset
	is set.  Only mark a PLT symbol as undefined if it was not defined
	by a regular object file.  Create a GOT entry if got_offset is
	set.  Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
	(elf32_sparc_finish_dynamic_sections): Store dynobj in a local
	variable.
	(elf_backend_check_relocs): Define.
1994-07-26 17:18:37 +00:00
Ian Lance Taylor b019d460d1 * scripttempl/elf.sc: Copy several more relocation sections into
the output.  Put .got.plt sections into .got.
1994-07-26 15:04:40 +00:00
Peter Schauer d938d0f96a * gdb.base/corefile.exp: Change `else if' to `elseif', which is
the correct TCL syntax.
1994-07-26 06:52:38 +00:00