Jim Kingdon [Fri, 25 Mar 1994 23:39:19 +0000 (23:39 +0000)]
new for ptx4
Jim Kingdon [Fri, 25 Mar 1994 23:22:48 +0000 (23:22 +0000)]
new for ptx4
Ian Lance Taylor [Fri, 25 Mar 1994 22:53:40 +0000 (22:53 +0000)]
* config/obj-aout.c (obj_aout_frob_symbol): If N_EXT is set for an
N_INDR symbol, set BSF_EXPORT and clear BSF_LOCAL.
Ian Lance Taylor [Fri, 25 Mar 1994 22:40:44 +0000 (22:40 +0000)]
* config/tc-mips.c (append_insn): If EMBEDDED_PIC, don't swap a
branch with an instruction that uses $at, in case the branch is
later expanded.
(macro): If EMBEDDED_PIC, case M_JAL_A may use $at.
(md_pcrel_from): If not OBJ_AOUT, return 4 for an undefined symbol
to make it pcrel_offset.
(tc_gen_reloc): If not OBJ_AOUT, set the reloc addend to
reloc->address; another gruesome hack to get gas reloc handling to
do the right thing.
Ian Lance Taylor [Fri, 25 Mar 1994 22:37:55 +0000 (22:37 +0000)]
Changes to support linker relaxing of embedded MIPS PIC code to
use a five instruction sequence for funtion calls which are out of
range of the bal instruction.
* libecoff.h (struct ecoff_section_tdata): Define.
(ecoff_section_data): Define.
(ecoff_bfd_relax_section): Don't define.
* ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free
the debugging information if it has already been read.
(ecoff_indirect_link_order): Handle _cooked_size being different
from _raw_size. Don't reread the contents or the relocs if they
have already been read in.
* coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from
18 to 16.
(PCREL16_EXPANSION_ADJUSTMENT): Define.
(mips_relocate_refhi): Take adjust argument.
(mips_relocate_section): Handle reloc offsets stored in section
used_by_bfd field. Call mips_relax_pcrel16 to handle details of
expanding an out of range PCREL16. Keep trace of adjustments
required by expansions. Set s and unset h when converting a reloc
from undefined to section. Change handling of PC relative relocs:
if against a section, they are correct in the object file, if
against an external symbol they are pcrel_offset.
(mips_relax_section): New function.
(mips_relax_pcrel16): New function.
(ecoff_bfd_relax_section): Define.
* coff-alpha.c (ecoff_bfd_relax_section): Define.
* ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments
built by mips_relax_section when writing out addresses.
* elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
Ian Lance Taylor [Fri, 25 Mar 1994 22:22:29 +0000 (22:22 +0000)]
* 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).
Ian Lance Taylor [Fri, 25 Mar 1994 22:18:00 +0000 (22:18 +0000)]
* ecoff.h (struct ecoff_debug_info): Add adjust field.
(struct ecoff_value_adjust): Define.
Ian Lance Taylor [Fri, 25 Mar 1994 22:14:48 +0000 (22:14 +0000)]
Fix typo in comment.
Ian Lance Taylor [Fri, 25 Mar 1994 22:13:02 +0000 (22:13 +0000)]
* aoutx.h (NAME(aout,find_nearest_line)): The caller expects
functionname_ptr to be set to a symbol name, so prepend
symbol_leading_char.
Jeff Law [Fri, 25 Mar 1994 18:48:24 +0000 (18:48 +0000)]
* hppa-tdep.c (skip_prologue): Return "pc" not zero
if no unwind descriptor is found.
Jeff Law [Fri, 25 Mar 1994 18:21:49 +0000 (18:21 +0000)]
* 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.
Jeff Law [Fri, 25 Mar 1994 18:15:10 +0000 (18:15 +0000)]
* paread.c (read_unwind_info): Fix off-by-one error.
Jim Kingdon [Fri, 25 Mar 1994 16:39:05 +0000 (16:39 +0000)]
* main.c (complete_command): Deal with it if arg is NULL.
Ken Raeburn [Fri, 25 Mar 1994 02:39:19 +0000 (02:39 +0000)]
* 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.
Jim Kingdon [Fri, 25 Mar 1994 01:38:24 +0000 (01:38 +0000)]
* 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.
Stu Grossman [Fri, 25 Mar 1994 01:38:12 +0000 (01:38 +0000)]
Netware debugger stub NLM.
Ian Lance Taylor [Thu, 24 Mar 1994 20:25:12 +0000 (20:25 +0000)]
* 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.
Steve Chamberlain [Thu, 24 Mar 1994 19:45:23 +0000 (19:45 +0000)]
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.
Jim Kingdon [Thu, 24 Mar 1994 18:32:31 +0000 (18:32 +0000)]
* 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.
Jeff Law [Thu, 24 Mar 1994 17:21:50 +0000 (17:21 +0000)]
* som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
(som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
David Edelsohn [Thu, 24 Mar 1994 17:18:34 +0000 (17:18 +0000)]
(NM_FOR_TARGET): Build tree version is now nm.new.
Jim Kingdon [Thu, 24 Mar 1994 17:03:23 +0000 (17:03 +0000)]
* stabsread.c (patch_block_stabs): Add comment about what happens
if the definition is in another compilation unit from the stab.
Jim Kingdon [Thu, 24 Mar 1994 16:26:57 +0000 (16:26 +0000)]
* TODO: Add suggestions for static member function tests, and
completion tests.
Jim Kingdon [Thu, 24 Mar 1994 16:25:47 +0000 (16:25 +0000)]
Update for Things-to-lose and lose_these_too.
Jim Kingdon [Thu, 24 Mar 1994 16:11:11 +0000 (16:11 +0000)]
* stabs.texinfo (Global Variables): Talk about stabs in files
where variables are referenced, but not defined.
Jim Kingdon [Thu, 24 Mar 1994 15:32:42 +0000 (15:32 +0000)]
* stabsread.c (patch_block_stabs): Don't create LOC_OPTIMIZED_OUT
symbols. Reverts change of 2 Apr 1993.
Jim Kingdon [Thu, 24 Mar 1994 15:12:40 +0000 (15:12 +0000)]
* dbxread.c (end_psymtab): Add comment about empty psymtabs.
Jim Kingdon [Thu, 24 Mar 1994 15:00:52 +0000 (15:00 +0000)]
* 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.
Stu Grossman [Thu, 24 Mar 1994 00:20:53 +0000 (00:20 +0000)]
* 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.
Stan Shebs [Wed, 23 Mar 1994 23:52:06 +0000 (23:52 +0000)]
Updated list of keep-* options.
David MacKenzie [Wed, 23 Mar 1994 22:30:14 +0000 (22:30 +0000)]
* netbsd386.c (N_SET_FLAGS): Delete the old definition.
Stan Shebs [Wed, 23 Mar 1994 22:25:00 +0000 (22:25 +0000)]
MPW config stuff for GDB.
Stan Shebs [Wed, 23 Mar 1994 22:17:53 +0000 (22:17 +0000)]
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.
Stan Shebs [Wed, 23 Mar 1994 22:16:54 +0000 (22:16 +0000)]
Sanitization for MPW and GM additions.
Stan Shebs [Wed, 23 Mar 1994 22:14:11 +0000 (22:14 +0000)]
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.
Stan Shebs [Wed, 23 Mar 1994 20:41:47 +0000 (20:41 +0000)]
Simplification of GM-specific config bits.
Ian Lance Taylor [Wed, 23 Mar 1994 20:21:06 +0000 (20:21 +0000)]
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.
Ian Lance Taylor [Wed, 23 Mar 1994 19:17:27 +0000 (19:17 +0000)]
* emultemp/gld960.em: Include libiberty.h
(gld960_before_parse): Pass NULL as final argument to concat.
Jim Kingdon [Wed, 23 Mar 1994 15:52:11 +0000 (15:52 +0000)]
* gdbtypes.h, gdbtypes.c: Add comments regarding whether static
member functions have an element in args for a (nonexistent) this
pointer.
Jim Kingdon [Wed, 23 Mar 1994 15:18:17 +0000 (15:18 +0000)]
* 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 #.
Jeff Law [Wed, 23 Mar 1994 04:16:32 +0000 (04:16 +0000)]
* 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.
Jeff Law [Wed, 23 Mar 1994 04:14:34 +0000 (04:14 +0000)]
* 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.
Ian Lance Taylor [Wed, 23 Mar 1994 00:43:48 +0000 (00:43 +0000)]
Handle .gpword and .cpadd only for SVR4_PIC, not != NO_PIC. Still
covered by last ChangeLog entry.
Jim Kingdon [Wed, 23 Mar 1994 00:34:44 +0000 (00:34 +0000)]
* values.c (set_internalvar): Don't set var->value until we are
sure there won't be an error().
Ian Lance Taylor [Tue, 22 Mar 1994 23:46:17 +0000 (23:46 +0000)]
* scripttempl/aout.sc: Force _end and __end to be aligned to a
four byte boundary.
Jim Kingdon [Tue, 22 Mar 1994 23:44:39 +0000 (23:44 +0000)]
* remote.c (get_offsets): Reinstate comment which was in
remote_wait about use of SECT_OFF_TEXT and so on.
Ian Lance Taylor [Tue, 22 Mar 1994 20:27:58 +0000 (20:27 +0000)]
* 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.
Ian Lance Taylor [Tue, 22 Mar 1994 20:13:37 +0000 (20:13 +0000)]
* 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.
Ian Lance Taylor [Tue, 22 Mar 1994 19:00:08 +0000 (19:00 +0000)]
* config/obj-ecoff.h (obj_sec_sym_ok_for_reloc): Define to be 1.
Jeff Law [Tue, 22 Mar 1994 18:51:41 +0000 (18:51 +0000)]
* gprof.c (funcsymbol): Use bfd_get_symbol_info instead of
bfd_decode_symclass.
Ian Lance Taylor [Tue, 22 Mar 1994 18:18:40 +0000 (18:18 +0000)]
* 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.
Ian Lance Taylor [Tue, 22 Mar 1994 18:18:32 +0000 (18:18 +0000)]
* 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.
Jeff Law [Tue, 22 Mar 1994 18:04:59 +0000 (18:04 +0000)]
* 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.
Ian Lance Taylor [Tue, 22 Mar 1994 00:27:05 +0000 (00:27 +0000)]
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.
Ian Lance Taylor [Tue, 22 Mar 1994 00:24:13 +0000 (00:24 +0000)]
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.
Ian Lance Taylor [Tue, 22 Mar 1994 00:21:38 +0000 (00:21 +0000)]
* bfdlink.h (struct bfd_link_callbacks): Change bitsize argument
to add_to_set to reloc. Remove bitsize argument from constructor.
Comment that reloc_overflow, reloc_dangerous and unattached_reloc
must handle NULL pointers for reloc location.
(enum bfd_link_order_type): Add bfd_section_reloc_link_order and
bfd_symbol_reloc_link_order.
(struct bfd_link_order): Add reloc field to union.
(struct bfd_link_order_reloc): Define.
Peter Schauer [Mon, 21 Mar 1994 21:16:16 +0000 (21:16 +0000)]
* config/i386/tm-i386aix.h, config/i386/tm-sun386.h,
config/i386/tm-symmetry.h (REGISTER_CONVERT_TO_RAW): Fix typo.
* config/i386/tm-symmetry.h: Make comment inside #if 0 a real
comment.
* config/i386/tm-symmetry.h (STORE_STRUCT_RETURN): Cast argument
to write_memory to avoid warnings from gcc.
* config/i386/xm-symmetry.h: Add missing #endif.
* config/i386/nm-symmetry.h (NO_PTRACE_H): Add for Dynix.
* config/i386/symmetry.mt (TDEPFILES): Add i386-tdep.o.
* config/i386/symmetry.mh (NAT_FILE, NATDEPFILES): Add.
Peter Schauer [Mon, 21 Mar 1994 21:14:27 +0000 (21:14 +0000)]
* symmisc.c (maintenance_check_symtabs): New function to check
consistency of psymtabs and symtabs.
* symtab.h (maintenance_check_symtabs): Add prototype.
* maint.c: Add new `maint check-symtabs' command.
Stu Grossman [Mon, 21 Mar 1994 19:57:38 +0000 (19:57 +0000)]
Mon Mar 21 11:02:51 1994 Stu Grossman (grossman at cygnus.com)
* alpha-tdep.c: Gobs of changes (many imported from mips-tdep) to
improve remote debugging efficiency. Also fixed problems with
doing function calls for programs with no entry points.
* infcmd.c (run_stack_dummy): Use CALL_DUMMY_ADDRESS instead of
entry_point_address.
* inferior.h (PC_IN_CALL_DUMMY): ditto.
* mdebugread.c (parse_symbol, parse_procedure, parse_external,
parse_lines): Pass section_offsets info to these routines so that
we can relocate symbol table entries upon readin.
* (psymtab_to_symtab_1): Set symtab->primary to tell
objfile_relocate to do relocations for our symbols.
* (ecoff_relocate_efi): New routine to relocate adr field of PDRs
(which hang off of the symbol table).
* Use prim_record_minimal_symbols_and_info instead of
prim_record_minimal_symbols to supply section info to make minimal
symbol relocations work.
* minsyms.c (prim_record_minimal_symbols_and_info): If section is
-1, try to deduce it from ms_type.
* objfiles.c (objfile_relocate): Use ALL_OBJFILE_SYMTABS where
appropriate. Handle relocation of MIPS_EFI symbols special. Also,
add code to relocate objfile->sections data structure.
* remote.c (get_offsets): Use new protocol message to acquire
section offsets from the target.
* (remote_wait): Get rid of relocation stuff. That's all handled
by objfile_relocate now.
* config/alpha/alpha-nw.mt (TM_FILE): Use tm-alphanw.h.
* config/alpha/tm-alpha.h: Define CALL_DUMMY_ADDRESS, and
VM_MIN_ADDRESS.
* config/alpha/tm-alphanw.h: DECR_PC_AFTER_BREAK=0, VM_MIN_ADDRESS=0.
Jeff Law [Mon, 21 Mar 1994 19:53:36 +0000 (19:53 +0000)]
* hppa-tdep.c (hppa_fix_call_dummy): Use value_ptr.
(hppa_push_arguments): Likewise.
Stu Grossman [Mon, 21 Mar 1994 19:52:50 +0000 (19:52 +0000)]
* alpha-tdep.c: Gobs of changes (many imported from mips-tdep) to
improve remote debugging efficiency. Also fixed problems with
doing function calls for programs with no entry points.
* infcmd.c (run_stack_dummy): Use CALL_DUMMY_ADDRESS instead of
entry_point_address.
* inferior.h (PC_IN_CALL_DUMMY): ditto.
* mdebugread.c (parse_symbol, parse_procedure, parse_external,
parse_lines): Pass section_offsets info to these routines so that
we can relocate symbol table entries upon readin.
* (psymtab_to_symtab_1): Set symtab->primary to tell
objfile_relocate to do relocations for our symbols.
* (ecoff_relocate_efi): New routine to relocate adr field of PDRs
(which hang off of the symbol table).
* Use prim_record_minimal_symbols_and_info instead of
prim_record_minimal_symbols to supply section info to make minimal
symbol relocations work.
* minsyms.c (prim_record_minimal_symbols_and_info): If section is
-1, try to deduce it from ms_type.
* objfiles.c (objfile_relocate): Use ALL_OBJFILE_SYMTABS where
appropriate. Handle relocation of MIPS_EFI symbols special. Also,
add code to relocate objfile->sections data structure.
* remote.c (get_offsets): Use new protocol message to acquire
section offsets from the target.
* (remote_wait): Get rid of relocation stuff. That's all handled
by objfile_relocate now.
* config/alpha/alpha-nw.mt (TM_FILE): Use tm-alphanw.h.
* config/alpha/tm-alpha.h: Define CALL_DUMMY_ADDRESS, and
VM_MIN_ADDRESS.
* config/alpha/tm-alphanw.h: DECR_PC_AFTER_BREAK=0, VM_MIN_ADDRESS=0.
Ian Lance Taylor [Mon, 21 Mar 1994 17:58:39 +0000 (17:58 +0000)]
* objdump.c (objdump_print_address): Make static. Declare with
prototype. Change vardiff from int to bfd_signed_vma. Correct
binary search termination condition. When looking for same
section symbol in relocatable file, handle final symbol correctly.
Jeff Law [Mon, 21 Mar 1994 03:42:06 +0000 (03:42 +0000)]
* bfd/som.c (som_begin_writing): Fix thinko (off by one error).
Jeff Law [Mon, 21 Mar 1994 02:08:37 +0000 (02:08 +0000)]
* som.c (bfd_section_from_som_symbol): Only to do the value
comparison for function symbols within executables.
David Edelsohn [Sun, 20 Mar 1994 23:45:33 +0000 (23:45 +0000)]
* config/sparc/sp64.mt (SIMFILES): Use remote-sim.o now.
(TM_CLIBS): Define to -lm, the simulator uses the sqrt() function.
* config/sparc/tm-sp64.h (FPS_REGNUM, CPS_REGNUM): Define (so
sparc-tdep.c compiles).
(TARGET_PTR_BIT): Must be a constant now, fix at 64.
Jeff Law [Sun, 20 Mar 1994 23:40:41 +0000 (23:40 +0000)]
* Makefile.in: Avoid bug in hpux sed.
David Edelsohn [Sun, 20 Mar 1994 23:36:50 +0000 (23:36 +0000)]
(FPS_REGNUM, CPS_REGNUM): Define (so sparc-tdep.c compiles).
(TARGET_PTR_BIT): Must be a constant now, fix at 64.
David Edelsohn [Sun, 20 Mar 1994 23:31:15 +0000 (23:31 +0000)]
(SIMFILES): Use remote-sim.o instead of remote-sp64sim.o.
(TM_CLIBS): Define to -lm, the simulator uses the sqrt() function.
Jeff Law [Sun, 20 Mar 1994 23:27:37 +0000 (23:27 +0000)]
* som.c (bfd_section_from_som_symbol): Renamed from
som_section_from_subspace_index. Pass in a native SOM symbol.
For executables, iterate through the sections to find out
which contains the symbol's address rather than using the
symbol_info field. (symbol_info has a different meaning for
dynamicly linked executables.)
David Edelsohn [Sun, 20 Mar 1994 23:25:16 +0000 (23:25 +0000)]
sparc-tdep.c (sparc_frame_find_save_regs): Use REGISTER_RAW_SIZE instead of 4.
David Edelsohn [Sun, 20 Mar 1994 23:17:18 +0000 (23:17 +0000)]
sp64-tdep.c (target_ptr_bit, set_target_ptr_bit): Deleted, can no longer set
this at run time.
David Edelsohn [Sun, 20 Mar 1994 23:11:16 +0000 (23:11 +0000)]
(target_ptr_bit, set_target_ptr_bit): Deleted, can no longer set this
at run time.
Jeff Law [Sun, 20 Mar 1994 21:39:35 +0000 (21:39 +0000)]
* trad-core.c (trad_unix_core_file_p): Don't pass abfd to
bfd_zmalloc.
Ken Raeburn [Sun, 20 Mar 1994 21:13:59 +0000 (21:13 +0000)]
* Makefile.in (config-stamp): If `defs' is defined, emit a preprocessor
directive to create a macro named by this value into config.new; don't
explicitly go for BFD_ASSEMBLER.
* configure.in: Define `defs', not `BFDDEF'. Set it to MANY_SEGMENTS for any
obj-coffbfd target.
* config/obj-coffbfd.h (BFD_HEADERS, BFD): Define.
* config/i386coff.mt (TDEFINES): Don't define BFD, MANY_SEGMENTS, BFD_HEADERS.
(LOCAL_LOADLIBES): Deleted.
* config/m68kcoff.mt (TDEFINES): Don't define those macros.
* config/m88kcoff.mt (TDEFINES): Ditto.
* config/ebmon29k.mt: Deleted.
* config/h8300hds.mt: Deleted.
* config/ic960coff.mt: Deleted.
* config/sparc.mt: Deleted.
* config/h8300.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
* config/h8500.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
* config/sh.mt (LOCAL_LOADLIBES, TDEFINES): Deleted.
* config/z8k.mt (LOCAL_LOADLIBES): Deleted.
(TDEFINES): Don't define the coffbfd macros.
* Makefile.in: Insert makefile fragments before OBJS definition.
(OBJS): Add $(TE_OBJS).
Ken Raeburn [Sun, 20 Mar 1994 21:07:43 +0000 (21:07 +0000)]
* config/obj-coff.c (obj_pseudo_table): Supply "section" unconditionally.
Ken Raeburn [Sun, 20 Mar 1994 21:01:31 +0000 (21:01 +0000)]
* write.c (set_symtab): Define only if BFD_ASSEMBLER.
David Edelsohn [Sun, 20 Mar 1994 20:44:34 +0000 (20:44 +0000)]
Remove v9 sanitization.
Jeff Law [Sun, 20 Mar 1994 20:06:53 +0000 (20:06 +0000)]
* Makefile.in (STAGESTUFF): Add gasp.new.
Jeff Law [Sun, 20 Mar 1994 19:29:05 +0000 (19:29 +0000)]
* configure.in (hppa*-*-*): Enable binutils.
Jeff Law [Sun, 20 Mar 1994 19:27:40 +0000 (19:27 +0000)]
* objcopy.c: Changes to keep it from stripping symbols used
in output relocations.
(mark_symbols_used_in_relocations): New function. Mark symbols
used in output relocations with BSF_KEEP.
(filter_symbols): Do not strip symbols marked with BSF_KEEP.
(copy_object): Reorder actions. First setup sections, then
build the output symbol table, then copy the section contents.
Jeff Law [Sun, 20 Mar 1994 19:22:04 +0000 (19:22 +0000)]
* som.c (som_begin_writing): Fix braino (one call to align
space/subspace data was done unconditionally rather than
just for executables.)
Jeff Law [Sun, 20 Mar 1994 17:27:51 +0000 (17:27 +0000)]
* som.c (som_begin_writing): Align text in all executables to
make HPUX kernel happy. Fixes strip/objcopy for shared
executables.
Jim Kingdon [Sat, 19 Mar 1994 21:13:58 +0000 (21:13 +0000)]
* bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
* libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
* cisco-core.c: New file.
* Makefile.in: Change accordingly.
* configure.in: Recognize cisco_core_vec.
* config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
* targets.c: Add cisco_core_vec.
* bfd-in2.h: Rebuilt.
Jim Kingdon [Sat, 19 Mar 1994 20:02:54 +0000 (20:02 +0000)]
* config/m68k/{cisco.mt,tm-cisco.h}: New files.
Jim Kingdon [Sat, 19 Mar 1994 19:53:31 +0000 (19:53 +0000)]
* config/m68k/{cisco.mt,tm-cisco.h}: New files.
* Makefile.in (ALLPARAM, ALLCONFIG): Add them.
* configure.in: Recognize m68*-cisco*-*.
Jim Kingdon [Sat, 19 Mar 1994 19:50:57 +0000 (19:50 +0000)]
* config.sub: Recognize cisco.
Jim Kingdon [Sat, 19 Mar 1994 19:32:51 +0000 (19:32 +0000)]
New for cisco
Jim Kingdon [Sat, 19 Mar 1994 18:49:50 +0000 (18:49 +0000)]
* Makefile.in (TAGS): Use variables directly, rather than using
find, to locate TM_FILE, XM_FILE, and NAT_FILE. This is faster
and means that these filenames no longer need be unique across all
the config/* directories.
* configure.in: Put the config/*/ into TM_FILE, etc.
* m68k-stub.c (computeSignal): Return SIGFPE, not SIGURG, for chk
and trapv exceptions.
* target.h (struct section_table), objfiles.h (struct obj_section):
Change name of field sec_ptr to the_bfd_section. More mnemonic
and avoids the (sort of, for the ptx compiler) name clash with
the name of the typedef.
* exec.c, xcoffexec.c, sparc-tdep.c, rs6000-nat.c, osfsolib.c,
solib.c, irix5-nat.c, objfiles.c, remote.c: Change users.
* utils.c: Include readline.h.
* Makefile.in (utils.o): Add dependency.
* remote.c (getpkt): Add support for run-length encoding.
Jim Kingdon [Sat, 19 Mar 1994 17:51:39 +0000 (17:51 +0000)]
* cisco-core.c: New file.
Jeff Law [Sat, 19 Mar 1994 15:08:12 +0000 (15:08 +0000)]
* som.c (som_begin_writing): Account for alignment needs of
subspaces too when writing executables. Never request a negative
bss size. Fixes some problems with demand paged executables,
still having problems with pure executables and shared executables.
Jeff Law [Sat, 19 Mar 1994 06:41:54 +0000 (06:41 +0000)]
* som.h (som_copyable_section_data_struct): New structure
containing all the private section information which needs
to be copied from input section to output section during
objcopy or strip.
(som_section_data_struct): Remove several fields now in
som_copyable_section_data_struct. Make the space and
subspace dictionaries be pointers (to save space when
only reading objects).
* som.c (bfd_som_set_section_attributes): Now returns a boolean;
some references changed. Allocate a copyable data stucture if
none exists. Store info into the copyable data structure.
(bfd_som_set_subsection_attributes): Likewise.
(som_is_space, som_is_subspace, som_is_container): New functions.
Use these instead of directly accessing private data.
(som_prep_headers): Allocate space and subspace headers here.
Fill in some fields in the space/subspace headers from the
copyable data.
(som_bfd_copy_private_section_data): Only copy the stuff
that we really need to make objcopy and strip work. Allocate
the copy_data structure for the output bfd before copying.
Jim Kingdon [Sat, 19 Mar 1994 06:36:47 +0000 (06:36 +0000)]
* bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
* libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
* cisco-core.c: New file.
* Makfile.in: Change accordingly.
* bfd-in2.h: Rebuilt.
Jim Kingdon [Sat, 19 Mar 1994 06:36:18 +0000 (06:36 +0000)]
* utils.c (prompt_for_continue): Call readline, not gdb_readline.
Jim Kingdon [Sat, 19 Mar 1994 06:17:08 +0000 (06:17 +0000)]
* trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
bfd_zalloc for rawptr, because later on we may call free, not
bfd_release, on it.
* bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
* libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
* cisco-core.c: New file.
* Makfile.in: Change accordingly.
* bfd-in2.h: Rebuilt.
Jeff Law [Sat, 19 Mar 1994 05:06:54 +0000 (05:06 +0000)]
* som.h (struct som_exec_data): New structure to hold exec
info that must be preserved when running objcopy/strip.
(struct somdata): Add new "exec_data" field and accessor
macro. Add some comments on how the various fields are used.
(som_section_data_struct): Make is_space and is_subspace bitfields.
Delete unused subspace_index. All references now use the
target_index field within the section structure itself.
* som.c (make_unique_section): Delete unused declaration.
(som_bfd_copy_private_bfd_data): New function.
(som_object_setup): Allocate space for and save exec information
that needs to be copied during objcopy/strip.
(som_mkobject): Do not allocate space for a file header here.
It is not used when only reading SOM objects.
(som_prep_headers): Allocate space for and attach a file header
to the output bfd. For executables, use the saved system_id
value rather than trying to guess the right value. Do not abort
wwhen setting file_hdr->entry* for executables.
(som_begin_writing): For executables, set the exec_entry and
exec_flags fields.
(som_copy_private_backend_section_data): Always return a value.
Jeff Law [Sat, 19 Mar 1994 03:54:49 +0000 (03:54 +0000)]
* libhppa.h (PA_PAGESIZE): Define.
* som.c (SOM_ALIGN): Define.
(som_begin_writing): If writing an executable, initialize all
fields in the exec header to zero. Update fields in the exec
header as sizes of loadable subspaces are computed. Carefully
preserve alignments when building executables. Actually write the
exec after all the fields are filled in.
Steve Chamberlain [Sat, 19 Mar 1994 03:16:10 +0000 (03:16 +0000)]
* utils.c (prompt_for_continue): Call readline, not gdb_readline.
Ken Raeburn [Sat, 19 Mar 1994 02:36:09 +0000 (02:36 +0000)]
* write.c (symbol_table_frozen): New variable, to be set after bfd_set_symtab
is called.
(dump_section_relocs): Note whether a symbol is a section symbol or not.
(adjust_reloc_syms): For now, always supply an absolute symbol for fixups
without symbols but not yet `done'. Use section_symbol to get the symbol,
instead of going directly for abs_symbol.
(write_relocs) [DEBUG4]: Abort if any symbol referred to by a reloc is not a
section symbol and is not in the symbol table.
(set_symtab): New function, broken out from write_object_file. Counts symbol
table instead of relying on an earlier count.
(write_object_file): Call set_symtab, but do it after potentially invoking the
*_frob_file macros. Don't bother counting symbols. Call symbol_remove,
instead of expanding it in place. Moved the conditionalized `object_file_size'
declaration down to conditionalized block where it's used. When using the
absolute symbol for a fixup without a symbol, set sy_used_in_reloc.
(write_object_file) [BFD_ASSEMBLER]: Call section_symbol to get the correct
symbol for the absolute section.
Jeff Law [Sat, 19 Mar 1994 02:17:15 +0000 (02:17 +0000)]
* Better long-filename handling. Reads SOM ABI compliant extended
names, but doesn't quite write compliant extended names yet.
* som.c (som_slurp_extended_name_table): Delete function. The
generic code will handle things correctly.
(som_slurp_armap): Seek to the beginning of the next member.
(normalize): New function.
(som_bfd_ar_write_symbol_stuff): Take the size of the extended
name table into account when computing the file offsets in the
SOM dictionary. Make sure to align to an even boundary.
(som_write_armap): Initialize the checksum to zero.
(ar_maxchars): Fix. Opps.
Jim Kingdon [Sat, 19 Mar 1994 02:12:30 +0000 (02:12 +0000)]
new for cisco crash dumps