Commit Graph

9698 Commits

Author SHA1 Message Date
Ian Lance Taylor f078dc7cf2 * ldlang.c (print_input_section): For section size, use
_cooked_size if it is non-zero, size otherwise.
	(size_input_section): Likewise.
	(lang_do_assignments): Likewise (case lang_input_section_enum).
1994-03-25 22:22:29 +00:00
Ian Lance Taylor 5517168c9e * ecoff.h (struct ecoff_debug_info): Add adjust field.
(struct ecoff_value_adjust): Define.
1994-03-25 22:18:00 +00:00
Ian Lance Taylor 91f300d635 Fix typo in comment. 1994-03-25 22:14:48 +00:00
Ian Lance Taylor ec099b4b25 * aoutx.h (NAME(aout,find_nearest_line)): The caller expects
functionname_ptr to be set to a symbol name, so prepend
	symbol_leading_char.
1994-03-25 22:13:02 +00:00
Jeff Law fdafbfad9e * hppa-tdep.c (skip_prologue): Return "pc" not zero
if no unwind descriptor is found.
1994-03-25 18:48:24 +00:00
Jeff Law eb1167c65c * tm-hppa.h (NUM_REGS): Bump to 128 registers.
(REGISTER_NAMES): Add entries for "right-half" of FP registers.
        (REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE): Do not treat FP regs
        differently.  All registers are four bytes.
        (REGISTER_BYTES, REGISTER_BYTE): Simplify now that all registers are
        the same size.
        (REGISTER_VIRTUAL_TYPE): Use builtin_type_float for all FP regs.

        * hppa-tdep.c (pa_print_fp_reg): Update to print even numbered FP
        registers as both single and double values (fetching 2nd 32bit half
        as necessary).  Annotate each register printed with its precision.
1994-03-25 18:21:49 +00:00
Jeff Law c8f75fe857 * paread.c (read_unwind_info): Fix off-by-one error. 1994-03-25 18:15:10 +00:00
Jim Kingdon 0c1af47ff0 * main.c (complete_command): Deal with it if arg is NULL. 1994-03-25 16:39:05 +00:00
Ken Raeburn 11d7c06453 * config/tc-alpha.c (alpha_ip): Only set GP prolog size if using PV register.
(T12): New macro.
(emit_insn): New function.
(md_assemble): Call it.
(alpha_force_relocation): Handle BFD_RELOC_26, for call_pal instructions.
(lituse_pending): New variable.  Set by anything that generates a LITERAL
reloc, cleared by anything that generates a LITUSE reloc, tested by code that
might want to emit a LITUSE reloc.
(emit_unaligned_io): New function.  Currently calls md_assemble, but it should
eventually be converted to generate the insn itself and call emit_insn directly.
(emit_load_unal, emit_store_unal, emit_byte_manip_r, emit_extract_r,
emit_insert_r, emit_mask_r, emit_sign_extend, emit_bis_r): Likewise.
(alpha_ip, case 'I'): Handle with BFD_RELOC_23.
(alpha_ip, label get_macro): Don't emit the final instruction if the opcode is
zero.
(alpha_ip, case 'B', subcase 'd'): New case, for subword and unaligned memory
access macros.
(md_apply_fix): Handle BFD_RELOC_26.  Generate an error message if the value
can't be resolved.
1994-03-25 02:39:19 +00:00
Jim Kingdon 4df6dcd10d * config/mips/tm-mips.h (SETUP_ARBITRARY_FRAME): Revise comment
regarding using the PC--using the PC is necessary and all the
	FIXME comments in the world won't make it go away.
1994-03-25 01:38:24 +00:00
Stu Grossman 27847c6f99 Netware debugger stub NLM. 1994-03-25 01:38:12 +00:00
Ian Lance Taylor 193c5f93a1 * ldlang.c (new_afile): Add new argument add_to_list. Don't set
real to true for lang_input_file_is_marker_enum.  Clear the_bfd.
	(lang_add_input_file): Pass true to new_afile for add_to_list.
	(lookup_name): Remove force_load argument.  Changed all callers.
	Pass false to new_afile for add_to_list.  Split loading of symbols
	out into separate function.
	(load_symbols): New function split out of lookup_name.  Don't load
	the symbols if they are already loaded.
	(open_input_bfds): For lang_input_statement_enum call load_symbols
	rather than lookup_name.
	(lang_process): Pass abs_output_section rather than NULL to
	lang_size_sections.
	(lang_startup): Set real field of first_file to true.
1994-03-24 20:25:12 +00:00
Steve Chamberlain 47e70c5417 Thu Mar 24 11:33:46 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
	for 16bit relative branches.
	* coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
	overflow.
1994-03-24 19:45:23 +00:00
Jim Kingdon 2f3b7d8eb5 * valops.c (value_at, value_at_lazy): Give error if we dereference
a pointer to void.
	* gdbtypes.h: Fix comments regarding TYPE_CODE_VOID.
	* stabsread.c: Use 1, not 0, for TYPE_LENGTH of void types.
1994-03-24 18:32:31 +00:00
Jeff Law 9d7f682f8c * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
(som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
1994-03-24 17:21:50 +00:00
David Edelsohn 18d94a58c0 (NM_FOR_TARGET): Build tree version is now nm.new. 1994-03-24 17:18:34 +00:00
Jim Kingdon 553e18620a * stabsread.c (patch_block_stabs): Add comment about what happens
if the definition is in another compilation unit from the stab.
1994-03-24 17:03:23 +00:00
Jim Kingdon b93e563cb7 * TODO: Add suggestions for static member function tests, and
completion tests.
1994-03-24 16:26:57 +00:00
Jim Kingdon 184d260bdf Update for Things-to-lose and lose_these_too. 1994-03-24 16:25:47 +00:00
Jim Kingdon 8816824a83 * stabs.texinfo (Global Variables): Talk about stabs in files
where variables are referenced, but not defined.
1994-03-24 16:11:11 +00:00
Jim Kingdon acdec9542b * stabsread.c (patch_block_stabs): Don't create LOC_OPTIMIZED_OUT
symbols.  Reverts change of 2 Apr 1993.
1994-03-24 15:32:42 +00:00
Jim Kingdon 5801f3488e * dbxread.c (end_psymtab): Add comment about empty psymtabs. 1994-03-24 15:12:40 +00:00
Jim Kingdon 0997322359 * main.c (complete_command): New command, from Rick Sladkey
<jrs@world.std.com>.
	(symbol_completion_function): Don't declare rl_point and
	rl_line_buffer; they are now declared in readline.h.
	(show_commands): Don't declare history_base; it is declared in
	history.h.
	* command.c (lookup_cmd): Don't delete trailing whitespace.
1994-03-24 15:00:52 +00:00
Stu Grossman ad15bea9df * minsyms.c (prim_record_minimal_symbol): Move section deduction
code from prim_record_minimal_symbol_and_info() to here.  Callers
	of the latter can legitimately supply a section number of -1.
1994-03-24 00:20:53 +00:00
Stan Shebs d12a71cabb Updated list of keep-* options. 1994-03-23 23:52:06 +00:00
David MacKenzie 1f1ed32d6d * netbsd386.c (N_SET_FLAGS): Delete the old definition. 1994-03-23 22:30:14 +00:00
Stan Shebs ea936fd77b MPW config stuff for GDB. 1994-03-23 22:25:00 +00:00
Stan Shebs 698ce51f3f Thu Mar 10 15:51:40 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-xconfig.in: New file, mips-targeting config fragment.
	* mpw-init.c: New file, MPW x mips version of init.c.
1994-03-23 22:17:53 +00:00
Stan Shebs d1bcda6791 Sanitization for MPW and GM additions. 1994-03-23 22:16:54 +00:00
Stan Shebs 8dc3e3d71f Thu Mar 10 15:49:05 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW configuration fragment.
	* mpw-make.in: New file, MPW makefile fragment.
	* config/m68k/xm-mpw.h: New file, MPW host definitions.
	* ser-mac.c: New file, Mac serial interface.
1994-03-23 22:14:11 +00:00
Stan Shebs 4ce336af5a Simplification of GM-specific config bits. 1994-03-23 20:41:47 +00:00
Ian Lance Taylor 456961d1bc Clean up the relaxing code for the new linker.
* targets.c (_bfd_relax_section): Take boolean *again argument
	rather than asymbol list.
	* bfd.c (bfd_relax_section): Change name of fourth argument from
	symbols to again.
	* reloc.c (bfd_generic_relax_section): Take boolean *again
	argument rather than asymbol list.  Always return true.
	* bout.c: Include genlink.h.
	(aligncode, perform_slip): Declare.
	(perform_slip): Take BFD argument rather than asymbol list.
	Changed all callers.  Get the symbols from the BFD.  Change the
	hash table entry value as well as the symbol value.
	(abs32code): Take BFD argument rather than asymbol list.  Changed
	all callers.
	(aligncode): Likewise.
	(b_out_relax_section): Take boolean *again argument rather than
	asymbol list.  Only return false if an error occurred.  Set *again
	to false.  Get symbols from BFD.
	* reloc16.c: Include genlink.h.
	(bfd_perform_slip): Take BFD argument rather than asymbol list.
	Get the symbols from the BFD.  Change the hash table entry value
	as well as the symbol value.
	(bfd_coff_reloc16_relax_section): Take boolean *again argument
	rather than asymbol list.  Only return false if an error occurred.
	Set *again to false.  Get symbols from BFD.
	* coffcode.h (bfd_coff_backend_data): Change
	_bfd_coff_reloc16_estimate to take BFD argument rather than
	asymbol list.
	(bfd_coff_reloc16_estimate): Corresponding change.
	(dummy_reloc16_estimate): Corresponding change.
	* libcoff-in.h (bfd_coff_reloc16_relax_section): Change
	declaration to take boolean * rather than asymbol list.
	(bfd_perform_slip): Change declaration to take BFD rather than
	asymbol list.
	* coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
	than asymbol list.  Changed calls to bfd_perform_slip.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
	* libcoff.h: Rebuilt.
	* Makefile.in: Rebuilt dependencies.
1994-03-23 20:21:06 +00:00
Ian Lance Taylor a2670c2f8b * emultemp/gld960.em: Include libiberty.h
(gld960_before_parse): Pass NULL as final argument to concat.
1994-03-23 19:17:27 +00:00
Jim Kingdon e552788b73 * gdbtypes.h, gdbtypes.c: Add comments regarding whether static
member functions have an element in args for a (nonexistent) this
	pointer.
1994-03-23 15:52:11 +00:00
Jim Kingdon 2b7ac6fdb0 * stabs.texinfo: Move stuff on @ and # type descriptors from node
Cplusplus to new nodes Member Type Descriptor and Method Type
	Descriptor.  Re-write stuff for #.
1994-03-23 15:18:17 +00:00
Jeff Law 0a64709eb4 * config/pa/tm-hppao.h (NO_PC_SPACE_QUEUE_RESTORE): Define.
* hppa-tdep.c (hppa_pop_frame): Do not restore the PC space
        queue if NO_PC_SPACE_QUEUE_RESTORE is defined.
1994-03-23 04:16:32 +00:00
Jeff Law 84ad95c118 * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
for the structure's type.  All callers changed.

        * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR
        for each structure argument rather than assuming it's either
        true or false for all structure arguments.

        * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only
        on the length structure passed, not the compiler used.

        * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional
        argument for the structure's type.
1994-03-23 04:14:34 +00:00
Ian Lance Taylor 7dfa376e9b Handle .gpword and .cpadd only for SVR4_PIC, not != NO_PIC. Still
covered by last ChangeLog entry.
1994-03-23 00:43:48 +00:00
Jim Kingdon 51f8393319 * values.c (set_internalvar): Don't set var->value until we are
sure there won't be an error().
1994-03-23 00:34:44 +00:00
Ian Lance Taylor f7a26f1b78 * scripttempl/aout.sc: Force _end and __end to be aligned to a
four byte boundary.
1994-03-22 23:46:17 +00:00
Jim Kingdon 29f2ceed48 * remote.c (get_offsets): Reinstate comment which was in
remote_wait about use of SECT_OFF_TEXT and so on.
1994-03-22 23:44:39 +00:00
Ian Lance Taylor d9aba8051e * config/tc-mips.c (enum mips_pic_level): New enum.
(mips_pic): Change from int to enum mips_pic_level.  Change all
	uses (0 becomes NO_PIC, 2 becomes SVR4_PIC).
	(load_address): Handle EMBEDDED_PIC.
	(macro): Handle EMBEDDED_PIC in all PIC cases.
	(md_parse_option): Accept -membedded-pic to use EMBEDDED_PIC.  If
	OBJ_ELF, accept -KPIC and -call_shared to use SVR4_PIC and accept
	-non_shared to use NO_PIC (this is how the Irix 5 assembler
	works).  Do not permit -G with SVR4_PIC.
	(s_abicalls): Warn if -G was used, and force -G 0.
	(tc_gen_reloc): Set reloc->addend to 0 for a PC relative reloc for
	anything but a.out, not just for ELF.  For ECOFF, don't generate a
	BFD_RELOC_16_PCREL_S2 reloc unless using EMBEDDED_PIC.
1994-03-22 20:27:58 +00:00
Ian Lance Taylor c031ba0b95 * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
reloc, used in embedded PIC code.
	(mips_adjust_reloc_in): Change sanity check to permit new reloc.
	(mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
	MIPS_R_PCREL16.
1994-03-22 20:13:37 +00:00
Ian Lance Taylor e1b5066f45 * config/obj-ecoff.h (obj_sec_sym_ok_for_reloc): Define to be 1. 1994-03-22 19:00:08 +00:00
Jeff Law 4b8250bda2 * gprof.c (funcsymbol): Use bfd_get_symbol_info instead of
bfd_decode_symclass.
1994-03-22 18:51:41 +00:00
Ian Lance Taylor 4335ce642d * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
counting relocs.  Set SEC_RELOC flag for any section which has
	relocs.

	* linker.c (_bfd_default_link_order): Handle bfd_data_link_order.

	* linker.c (_bfd_generic_link_add_symbols): Just call
	generic_link_add_symbols.
	(_bfd_generic_link_add_symbols_collect): New function, like
	_bfd_generic_link_add_symbols but also collect constructors and
	destructors by name as collect2 does.
	(generic_link_add_symbols): New function, like old
	_bfd_generic_link_add_symbols but with collect argument.
	(generic_link_add_object_symbols): Take collect argument.
	(generic_link_check_archive_element_no_collect): New function.
	(generic_link_check_archive_element_collect): New function.
	(generic_link_check_archive_element): Take collect argument.
	(generic_link_add_symbol_list): Take collect argument.
	(_bfd_generic_link_add_one_symbol): Rename constructor argument to
	collect.
	* libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
	* libbfd.h: Rebuilt.
1994-03-22 18:18:40 +00:00
Ian Lance Taylor f3bc3ac3fa * ldwrite.c (build_link_order): Handle lang_data_statement_enum by
building a bfd_data_link_order, rather than by setting the section
	contents immediately.
1994-03-22 18:18:32 +00:00
Jeff Law 9d92fe0af4 * archive.c (bfd_construct_extended_name_table): Use ar_padchar
for first character in an extended name.
        (_bfd_write_archive_contents): If ar_padchar == '/', then use
        "//" as the name of the special archive member holding the
        extended name table.
1994-03-22 18:04:59 +00:00
Ian Lance Taylor f1cca64780 Support for link_order types which generate relocs in order to
support -Ur in the linker.
	* linker.c (generic_link_add_symbol_list): Remove bitsize argument
	from call to _bfd_generic_link_add_one_symbol.
	(_bfd_generic_link_add_one_symbol): Remove bitsize argument.
	Don't pass bitsize to constructor call back.  Pass BFD_RELOC_CTOR
	instead of bitsize to add_to_set call back.
	(_bfd_generic_final_link): Account for link_order relocs when
	allocating space for relocations.  Handle them in link_order loop.
	(_bfd_generic_reloc_link_order): New function.
	(_bfd_default_link_order): If a reloc_link_order is seen here,
	abort.
	(_bfd_count_link_order_relocs): New function.
	* libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
	argument from declaration.
	(_bfd_generic_reloc_link_order): Declare.
	(_bfd_count_link_order_relocs): Declare.
	* libbfd.h: Rebuilt.
	* aoutx.h (aout_link_add_symbols): Remove bitsize argument from
	call to _bfd_generic_link_add_one_symbol.
	(NAME(aout,final_link)): Account for link_order relocs when
	allocating space for relocations.  Handle them after handling all
	input BFDs.
	(aout_link_reloc_link_order): New function.
	* ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
	call to _bfd_generic_link_add_one_symbol.
	(ecoff_bfd_final_link): Account for link_order relocs when
	allocating space for relocations.  Handle them in link_order loop.
	(ecoff_link_write_external): Set the storage class of a defined
	linker created symbol based on the section it is in.  Correct
	bfd_link_hash_weak case to use .sc rather than .st.
	(ecoff_reloc_link_order): New function.
	* coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
	BFD_RELOC_CTOR.
	* coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
1994-03-22 00:27:05 +00:00
Ian Lance Taylor 4fdbafb247 Changes to make -Ur work again.
* ldmain.c (add_to_set): Now takes reloc argument rather than
	bitsize.  Check config.build_constructors here.  If an new hash
	table entry is created, mark it as undefined.
	(constructor_callback): No longer takes bitsize argument.  Pass
	BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the
	BFD backend supports it.
	(reloc_overflow): Handle a NULL abfd argument.
	(reloc_dangerous, unattached_reloc): Likewise.
	* ldctor.c: Include ldmain.h.
	(struct set_info): Change bitsize field to reloc.
	(ldctor_add_set_entry): Now takes reloc argument rather than
	bitsize.  Don't bother to check config.build_constructors here.
	(ldctor_build_sets): Get the size from the reloc howto.  If
	generating relocateable output, call lang_add_reloc rather than
	lang_add_data.
	* ldctor.h (ldctor_add_set_entry): Change declaration to use reloc
	instead of bitsize.
	* ldlang.h (statement_enum): Add lang_reloc_statement_enum.
	(lang_reloc_statement_type): New structure.
	(lang_statement_union_type): Add reloc_statement field.
	(lang_add_reloc): Declare new function.
	* ldlang.c (lang_for_each_statement_worker): Handle
	lang_reloc_statement_enum.
	(map_input_to_output_sections, print_statement): Likewise.
	(lang_size_sections, lang_do_assignments): Likewise.
	(print_reloc_statement): New function.
	(lang_add_reloc): New function.
	* ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
1994-03-22 00:24:13 +00:00