Commit Graph

10047 Commits

Author SHA1 Message Date
Ian Lance Taylor 01de31edb9 * mh-irix4 (CC): Change -XNh1500 to -XNh2000. 1994-04-12 16:39:21 +00:00
Stu Grossman 70e375c356 Mon Apr 11 19:21:27 1994 Stu Grossman (grossman at cygnus.com)
* xcoffread.c (read_xcoff_symtab):  Ignore symbols of class C_EXT,
	smtyp XTY_LD, sclass XMC_DS (external data segment label).  They
	often have the same names as debug symbols for functions, and
	confuse lookup_symbol().
1994-04-12 02:53:09 +00:00
Bill Cox 099c286e74 * Makefile.in (check): Set TCL_LIBRARY for runtest. 1994-04-11 23:17:18 +00:00
Ian Lance Taylor bf08d1e266 * elfcode.h (assign_file_positions_except_relocs): Don't require
the file alignment to correspond to the page size when linking
	with -N.
1994-04-11 18:43:15 +00:00
Jim Wilson 60430a4667 * test-build.mk (CC): For mips-sgi-irix4, change -XNh1500 to
-XNh2000.
1994-04-11 18:00:46 +00:00
Jim Kingdon 2ddeed277e * remote.c: Around redefinition of PBUFSIZE, adjust whitespace.
* config/pa/tm-hppa.h (REGISTER_BYTES): Use 4 rather than
	REGISTER_RAW_SIZE (1).
	Together these changes work around a bug in HP's compiler.  Both
	seem to be necessary.
1994-04-11 17:52:11 +00:00
Ian Lance Taylor 4f2ee95801 * scripttempl/i386coff.sc: If relocating, don't put .init and
.fini sections into .text; keep them separate.
	* config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
	exist, get crtbegin based on gcc -print-libgcc-file-name.
	(HOSTING_LIBS): Similar change for ../gcc/crtend.o.
1994-04-11 16:35:39 +00:00
Jeff Law 699daa9c10 * paread.c (pa_symtab_read): Handle ST_STUB symbols and symbols
with scope SS_EXTERNAL.  ST_ENTRY symbols in dynamic executables
        are type mst_solib_trampoline.
1994-04-11 16:19:03 +00:00
Jeff Law bff0719996 * From Peter Schauer with minor modifications.
* gdb.t15/return.exp (return_tests): Handle targets where "return"
        stops in mid-line in the caller.  Add xfail for returning a float
        value on X86 targets.
1994-04-11 16:16:20 +00:00
Jeff Law caed9e8251 * config/tc-hppa.c (pa_procend): Handle case where label was
defined after the .proc directive.
1994-04-11 16:11:12 +00:00
Jeff Law 61b3c2c58b * gas/hppa/more.parse/callinfobug.s: Add missing name for procedure. 1994-04-11 16:03:21 +00:00
Jeff Law 1135d397cf * gas/hppa/more.parse/callinfobug.s: Add missing name for procedure. 1994-04-11 16:02:52 +00:00
Jeff Law 0521099057 * config/tc-hppa.c (pa_procend): Give an error if we encounter a
procend for a procedure without a name.
1994-04-11 16:02:12 +00:00
Jeff Law 77d9009d08 * gas/hppa/reloc/funcrelobug.s: Place the trampoline in the
$DATA$ rather than the $LIT$ subspace.
1994-04-11 14:55:16 +00:00
Jeff Law 9a5334e590 * elfcode.h (write_relocs): For rela relocations, adjust the
addend for relocations involving section symbols to account
        for the lossage of 1:1 mapping from input section symbols to
        output section symbols.
1994-04-10 08:12:33 +00:00
David MacKenzie 35be712d11 * configure: Unknown options are fatal again. 1994-04-09 22:11:36 +00:00
Jim Kingdon 7b2b07585e Fri Apr 8 17:14:37 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
* config/m68k/es1800.mt: Change comments.

Fri Apr  8 17:14:37 1994  Rob Savoye  (rob@darkstar.cygnus.com)

	* config/m68k/monitor.mt (TDEPFILES): Don't include remote-es.o.
1994-04-09 00:18:21 +00:00
Karen Christiansen a4c50dd0bb update platform targets 1994-04-08 23:35:47 +00:00
Stu Grossman 790a14a88b * lynx-nat.c: Restore regmap structure for SPARC. It's needed
for core files.
1994-04-08 22:37:35 +00:00
Jim Kingdon a110a1c30b * values.c (unpack_long): Remove obsolete comment about using a
switch statement.
1994-04-08 22:30:55 +00:00
Jim Kingdon f3e4ac4af6 * symfile.c (symbol_file_command): Add comments about command syntax. 1994-04-08 21:56:12 +00:00
Ian Lance Taylor ec6b18c4fa * aoutx.h (NAME(aout,make_sections)): New function.
(NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
	rather than making sections inline.
	(NAME(aout,mkobject)): Don't make any sections.
	(NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
	(NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
	obj_datasec (abfd) if they are NULL.
	* libaout.h (NAME(aout,make_sections)): Declare.
	* bout.c (b_out_mkobject): Don't make any sections.
	(b_out_write_object_contents): Call aout_32_make_sections.
	(b_out_set_section_contents): Likewise.
	* i386os9k.c (os9k_mkobject): Don't make any sections.
	(os9k_write_object_contents): Call aout_32_make_sections.
	(os9k_set_section_contents): Likewise.
1994-04-08 21:40:38 +00:00
David MacKenzie 0ffb871ed3 * configure: Ignore --x-includes and --x-libraries, for Autoconf
compatibility.
1994-04-08 19:03:23 +00:00
Ian Lance Taylor e48f985cd2 * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
index.
1994-04-08 16:24:01 +00:00
Peter Schauer 376f8f6844 * config/mips/mipsv4.mh, config/mips/mipsv4.mt,
config/mips/tm-mipsv4.h, config/mips/xm-mipsv4.h, mipsv4-nat.c:
	New files for MIPS SVR4 support.
1994-04-08 00:37:48 +00:00
Peter Schauer 77af4652a7 * config/alpha/nm-alpha.h (GDB_TARGET_HAS_SHARED_LIBS): Define,
OSF/1 has shared libraries.
1994-04-08 00:36:54 +00:00
Peter Schauer a9617bd573 * config/tm-sunos.h (IN_SOLIB_TRAMPOLINE, SKIP_TRAMPOLINE_CODE):
Define to handle stepping into  -g compiled shared libraries.
	* config/tm-sysv4.h (SKIP_TRAMPOLINE_CODE):  Define to handle
	stepping into  -g compiled shared libraries.
1994-04-08 00:36:08 +00:00
Peter Schauer 2fe3b329f6 * infrun.c (IN_SOLIB_TRAMPOLINE): Correct comment, trampolines
are in the .plt section.
	* minsyms.c (lookup_solib_trampoline_symbol_by_pc,
	find_solib_trampoline_target):  New functions for handling
	stepping into -g compiled shared libraries.
	* symtab.h (lookup_solib_trampoline_symbol_by_pc,
	find_solib_trampoline_target):  Add prototypes.
	* config/tm-sunos.h (IN_SOLIB_TRAMPOLINE, SKIP_TRAMPOLINE_CODE):
	Define to handle stepping into  -g compiled shared libraries.
	* config/tm-sysv4.h (SKIP_TRAMPOLINE_CODE):  Define to handle
	stepping into  -g compiled shared libraries.
	* configure.in:  Add mips-*-sysv4* support.
	* config/mips/mipsv4.mh, config/mips/mipsv4.mt,
	config/mips/tm-mipsv4.h, config/mips/xm-mipsv4.h, mipsv4-nat.c:
	New files for MIPS SVR4 support.
	* Makefile.in:  Update for new mipsv4 files.
	* alpha-tdep.c (heuristic_proc_desc, find_proc_desc):  Use
	read_next_frame_reg to obtain the frame relative stack pointer.
	* mips-tdep.c (heuristic_proc_desc):  Use read_next_frame_reg to
	obtain the frame relative stack pointer.
	* mdebugread.c (parse_partial_symbols, psymtab_to_symtab1):
	Handle stStatic and stStaticProc symbols in stabs-in-ecoff output
	by entering them into the minimal symbol table.
	* printcmd.c (print_scalar_formatted):  Do not try to unpack to
	a long for float formats.
	* solib.c:  Include "elf/mips.h" only if DT_MIPS_RLD_MAP does not
	get defined in <link.h>.
	* solib.c (solib_add):  Add shared library sections to the section
	table of the target before adding the symbols.
	* partial-stab.h:  Relocate static and global functions.
	* dbxread.c (read_dbx_symtab):  Remove unused variable
	end_of_text_address.  Relocate text_addr when passing it
	to end_psymtab.

	For Alpha OSF/1 targets, enable gdb to set breakpoints in shared
	library functions before the executable is run. Retrieve dynamic
	symbols from stripped executables.
	* mipsread.c (read_alphacoff_dynamic_symtab):  New function.
	* mipsread.c (mipscoff_symfile_read):  Use it. Issue warning message
	if no debugging symbols were found.
	* alpha-tdep.c (alpha_skip_prologue):  Silently return the unaltered
	pc if memory at the pc is not accessible and GDB_TARGET_HAS_SHARED_LIBS
	is defined.
	* config/alpha/nm-alpha.h (GDB_TARGET_HAS_SHARED_LIBS):  Define,
	OSF/1 has shared libraries.
1994-04-08 00:35:15 +00:00
David Edelsohn 44c1515dc7 Add clean target. 1994-04-08 00:33:47 +00:00
Peter Schauer 06863047a5 * config.bfd, configure.host: Add mips-*-sysv4* support. 1994-04-08 00:17:32 +00:00
Peter Schauer 49ad26c236 * config.guess: Add SINIX support.
* configure.in:  Add mips-*-sysv4* support.
1994-04-08 00:15:59 +00:00
Ken Raeburn 38d693ff69 note deleted .mt files 1994-04-07 23:02:49 +00:00
Ian Lance Taylor 192b64e7f9 * dbxread.c (read_dbx_dynamic_symtab): Adjust for recent changes
to BFD handling of dynamic symbols.
1994-04-07 19:13:17 +00:00
Ian Lance Taylor 1c803e5223 * config/tc-mips.c (macro): Pass NULL for expression argument to
macro_build for nori case.
	(SWITCH_TABLE): Define.
	(mips_force_relocation): Force a relocation for a switch table
	entry.
	(md_apply_fix): Write switch table entry value into file.
	(tc_gen_reloc): Use BFD_RELOC_GPREL32 for a switch table entry,
	and set the addend to the difference between the reloc address and
	the subtrahend.
1994-04-07 18:33:09 +00:00
Ian Lance Taylor dabf906e9b * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
(mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
	r_offset and set r_symndx to RELOC_SECTION_TEXT.
	(mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
	value from the r_offset field.
	(mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
	For MIPS_R_SWITCH, copy the r_offset field into the addend field.
	(mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
	into the r_offset field.
	(mips_switch_reloc): New function.
	(mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
	MIPS_R_SWITCH.
	(mips_relocate_section): Handle MIPS_R_SWITCH.
	(mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
1994-04-07 18:29:38 +00:00
Ian Lance Taylor 14bf9e4b42 Comment change. 1994-04-07 18:28:03 +00:00
Ian Lance Taylor f268681bc0 * mips.h (MIPS_R_SWITCH): Define. 1994-04-07 18:20:04 +00:00
Jeff Law 99a6c7613c * elfcode.h (elf_set_section_contents): Support calling the backend
function elf_backend_begin_write_processing when just beginning to
	write an object file.

	* libelf.h (elf_backend_begin_write_processing): Declare.

	* elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
	a default definition.
	(elf{32,64}_bed): Add elf_backend_begin_write_processing.

	* elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
	(elf_hppa_tc_make_sections): Likewise.

	* elf32-hppa.c (symext_chain_built): Delete.
	(symext_chain_size): Renamed from symextn_contents_real_size.
	(elf32_hppa_backend_{begin,final}_write_processing): New functions.
	(add_entry_to_symext_chain): New function.
	(hppa_elf_set_section_contents): Ignore writes to the symbol extension
	section until it's been rebuilt internally.
	(hppa_elf_get_section_contents): Symbol extension section is no
	longer special.
	(elf_backend_{begin,final}_write_processing): Define.
	(elf_hppa_tc_make_sections): Simplify now that much code has
	migrated into elf32_hppa_backend_{being,final}_write_processing.
1994-04-07 18:12:25 +00:00
Jeff Law 0b503989f5 * config/tc-hppa.h (elf_tc_symbol): Delete. No longer used.
(elf_tc_make_sections): Likewise.
        (hppa_tc_make_sections, hppa_tc_symbol): Delete extern decls.

        * config/tc-hppa.c (hppa_tc_make_sections): Delete function.
        (hppa_tc_symbol): Likewise.

        * config/obj-elf.c (elf_frob_file): Delete elf_tc_symbol and
        elf_tc_make_sections stuff.  It was there to support PA braindamage
        which has been fixed, and in the case of elf_tc_make_sections is
        redundant with elf_tc_final_processing.
1994-04-07 17:39:16 +00:00
Jeff Law f39a73b1b6 * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
manufacturer.
1994-04-07 03:49:18 +00:00
Ian Lance Taylor de3b08ac2e Added -D (--dynamic) option to nm and -T (--dynamic-syms) and -R
(--dynamic-reloc) arguments to objdump.
	* nm.c (dynamic): New static variable.
	(long_options): Added "dynamic".
	(usage): Mention -D and --dynamic.
	(main): Add D to getopt string.  Handle -D by setting dynamic.
	(display_rel_file): If dynamic is non-zero, read dynamic symbols
	rather than normal symbols.
	* nm.1: Updated for -D (--dynamic) option.
	* objdump.c (dump_dynamic_symtab): New global variable.
	(dump_dynamic_reloc_info): New global variable.
	(dynsyms, dynsymcount): New global variables.
	(usage): Mention -R, -T, --dynamic-syms and --dynamic-reloc.
	(long_options): Added "dynamic-reloc" and "dynamic-syms".
	(slurp_symtab): If no symbols, return rather than exit.
	(slurp_dynamic_symtab): New function.
	(display_bfd): Handle dump_dynamic_symtab and
	dump_dynamic_reloc_info.
	(dump_symbols): Take new dynamic argument, indicating whether to
	display dynamic symbols.
	(dump_relocs): Move most printing into dump_reloc_set.
	(dump_dynamic_relocs): New function.
	(dump_reloc_set): New function, extracted from dump_relocs.
	(main): Add R and T to getopt string.  Handle -T by setting
	dump_dynamic_symtab and -R by setting dump_dynamic_reloc_info.
	* objdump.1: Updated for -R (--dynamic-reloc) and -T
	(--dynamic-syms) options.
	* binutils.texi: Updated for new nm and objdump options.
1994-04-07 02:04:34 +00:00
Ian Lance Taylor dfc1c00613 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector. 1994-04-07 01:58:27 +00:00
Ian Lance Taylor fa77c7041c * sunos.c (MY_read_dynamic_symbols): Don't define.
(MY_read_dynamic_relocs): Don't define.
	(MY_get_dynamic_symtab_upper_bound): Define.
	(MY_canonicalize_dynamic_symtab): Define.
	(MY_get_dynamic_reloc_upper_bound): Define.
	(MY_canonicalize_dynamic_reloc): Define.
	(struct sunos_dynamic_info): Change type of dynsym_count and
	dynrel_count to long.  Add fields canonical_dynsym and
	canonical_dynrel.
	(sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
	Clear info->canonical_dynsym and info->canonical_dynrel.
	(MY(read_dynamic_symbols)): Removed.
	(MY(read_dynamic_relocs)): Removed.
	(sunos_get_dynamic_symtab_upper_bound): New function.
	(sunos_canonicalize_dynamic_symtab): New function.
	(sunos_get_dynamic_reloc_upper_bound): New function.
	(sunos_canonicalize_dynamic_reloc): New function.
	* libaout.h: Declare struct reloc_ext_external and
	reloc_std_external to avoid prototype problems.
	(struct aout_backend_data): Remove fields read_dynamic_symbols and
	read_dynamic_relocs.
	(NAME(aout,translate_symbol_table)): Declare.
	(NAME(aout,swap_ext_reloc_in)): Declare.
	(NAME(aout,swap_std_reloc_in)): Declare.
	* aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
	translate_symbol_table and made non-static.  Changed all callers.
	(NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
	(NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
	(NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
	* aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
	remove dynamic symbols and relocs.  They will no longer be
	present.
	(MY_read_dynamic_symbols): Don't define.
	(MY_read_dynamic_relocs): Don't define.
	(sunos4_aout_backend): Don't initialize dynamic entry points.
	* aout-target.h (MY_read_dynamic_symbols): Don't define.
	(MY_read_dynamic_relocs): Don't define.
	(MY(backend_data)): Don't initialize dynamic entry points.
	(MY_get_dynamic_symtab_upper_bound): If not defined, define to
	_bfd_nodynamic version.
	(MY_canonicalize_dynamic_symtab): Likewise.
	(MY_get_dynamic_reloc_upper_bound): Likewise.
	(MY_canonicalize_dynamic_reloc): Likewise.
1994-04-07 01:50:10 +00:00
Ian Lance Taylor ad46bd1d13 * targets.c (bfd_target): Add fields
_bfd_get_dynamic_symtab_upper_bound,
	_bfd_canonicalize_dynamic_symtab,
	_bfd_get_dynamic_reloc_upper_bound,
	_bfd_canonicalize_dynamic_reloc.
	(BFD_JUMP_TABLE_DYNAMIC): Define.
	* libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
	Define.
	(_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
	(_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
	(_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
	* bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
	(bfd_canonicalize_dynamic_symtab): Define.
	(bfd_get_dynamic_reloc_upper_bound): Define.
	(bfd_canonicalize_dynamic_reloc): Define.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
1994-04-07 01:48:51 +00:00
Ian Lance Taylor 7e29158a44 * cf-m68klynx.c: Include sysdep.h. 1994-04-07 01:47:16 +00:00
Ian Lance Taylor 93a8fd8dec Updated copyright (bfd-in2.h check in coming soon). 1994-04-07 01:40:54 +00:00
Ian Lance Taylor 6812b6077e * targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
	_bfd_debug_info_accumulate, which were never used.
	(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
	(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
	(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
	(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
	* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
	rather than the single JUMP_TABLE macro.  Removed many of the
	weird macro definitions needed to support the monolithic
	JUMP_TABLE.
	* bfd-in.h (JUMP_TABLE): Removed.
	* libbfd-in.h: Define a bunch of macros, and declare a few
	functions, for use with the new BFD_JUMP_TABLE_* macros.
	* libbfd.c (_bfd_dummy_new_section_hook): Removed.
	(bfd_false): Set bfd_error_invalid_operation.
	(bfd_nullvoidptr): Likewise.
	(bfd_n1): New function.
	(_bfd_nocore_core_file_matches_executable_p): Renamed from
	_bfd_dummy_core_file_matches_executable_p.
	(_bfd_nocore_core_file_failing_command): Similar rename.  Set
	bfd_error_invalid_operation.
	(_bfd_nocore_core_file_failing_signal): Likewise.
	(_bfd_generic_get_section_contents): Renamed from
	bfd_generic_get_section_contents.  Changed all callers.
	(_bfd_generic_set_section_contents): Similar rename.
	* ieee.c: #if 0 out ieee_bfd_debug_info_start,
	ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate.  They
	were never called.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
Ian Lance Taylor 76336d506d * mips-opc.c (mips_opcodes): Correct operands of "nor" with an
immediate argument.
1994-04-06 21:12:40 +00:00
Jeff Law 79f7de91c4 * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
if building a final executable.
1994-04-06 07:10:09 +00:00
Jeff Law 65b1ef4963 * Crude support for examining dynamic libraries.
* som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
        DL_MAGIC objects.
        (som_prep_headers): Preserve the system_id for DYNAMIC objects.
        Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
        Write exec headers for DYNAMIC objects.
        (som_begin_writing): DYNAMIC objects have the same alignment
        restrictions as D_PAGED objects.
        (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
        objects.
        (object_flags): Add DYNAMIC.
1994-04-06 05:11:31 +00:00