Commit Graph

13324 Commits

Author SHA1 Message Date
David Edelsohn
403d21d28f * config/tc-arc.c (byte_order): Provide explicit initial value.
Also delete entry for reverted -m{big,little}-endian patch.
1995-07-14 17:30:38 +00:00
Ian Lance Taylor
80b44d8a2c * syms.c: Fix comments so that `make info' works. 1995-07-14 17:23:07 +00:00
Ian Lance Taylor
175b3c0f1e * elf32-mips.c (mips_elf_find_nearest_line): Set SEC_HAS_CONTENTS
in .mdebug section, in case backend linker has cleared it.
1995-07-14 17:15:07 +00:00
Ian Lance Taylor
738844c1f1 * ld-undefined/undefined.exp: New test, to check reporting of
undefined symbols.
	* ld-undefined/undefined.c: New file.
1995-07-14 17:11:53 +00:00
Ian Lance Taylor
8a0683c1fa * ldver.c (help): Update list of options to match currently
supported list.
1995-07-14 16:12:26 +00:00
Michael Meissner
0c51f21a53 Fix PPC_ADDR16_HA relocations 1995-07-14 16:01:44 +00:00
Jeff Law
10f644eb64 * procfs.c (procfs_ops): Fix typo in last change. 1995-07-14 15:51:51 +00:00
Jeff Law
4575a69d6b * config/tc-hppa.h (UNDEFINED_DIFFERENCE_OK): Define for SOM.
* write.c (adjust_reloc_syms): Set sy_used_in_reloc for both
        symbols in a fixup where a defined symbol is subtracted from an
        undefined symbol (when UNDEFINED_DIFFERENCE_OK is defined).
        (fixup_segment): Do nothing for the difference of two symbols if
        UNDEFINED_DIFFERENCE_OK is defined.
1995-07-14 03:19:38 +00:00
Jeff Law
d4654e380e * som.c (hppa_som_gen_reloc_type): Choose a reasonable field
selector relocation for the difference of two symbols.
1995-07-14 03:15:15 +00:00
J.T. Conklin
19f6aedd53 * srconv.c (wr_tr): Write out handcrafted tr block.
(walk_tree_symbol): Use evallen and evalue instead of
vallen & value because of corresponding changes in
sysroff.info.

* sysdump.c (sysroff_swap_tr_in, sysroff_print_tr_out): New
functions.

* sysroff.info (tr): the tr block is a special case --- a block
without contents --- which can't be handled by generated code.
(den, dpp): only first byte is present for DENend, DPPend.
(dsy): describe a conditional portion of block, rename some fields.
(dps): describe a conditional portion of block.
(dfl): removed.

* sysinfo.y (yyerror): write error message to standard error.
1995-07-13 22:43:48 +00:00
Ken Raeburn
14cffc83e7 Use "&" instead of "#" for immediate operands. 1995-07-13 22:39:38 +00:00
Jeff Law
43fc25c87e * inftarg.c (child_thread_alive): New function to see if a
particular thread is still running.
        (child_ops): Add child_thread_alive entry.
        * remote.c (remote_thread_alive): New function to see if a
        particular thread is still alive.
        (remote_ops): Add remote_thread_alive.
        * target.c (dummy_target): Add dummy entry for thread_alive.
        (cleanup_target): de_fault thread_alive too.
        (update_current_target): INHERIT thread_alive too.
        (debug_to_thread_alive): New function.
        (setup_target_debug): Add debug_to_thread_alive.
        * target.h (struct target_ops): Add to_thread_alive.
        (target_thread_alive): Define.
        * thread.c (info_threads_command): Don't call kill; use
        target_thread_alive instead.
        * config/nm-lynx.h (CHILD_THREAD_ALIVE): Define.
        * gdbserver/low-lynx.c (mythread_alive): New function.
        (mywait): Don't restart any threads after a new thread notification,
        let the generic code handle it.
        * gdbserver/low-sparc.c (mythread_alive): Dummy version.
        * gdbserver/low-sun3.c (mythread_alive): Likewise.
        * gdbserver/server.c (main): Handle thread_alive requests.
        * gdbserver/server.h (mythread_alive): Declare.
        * corelow.c (core_ops): Add dummy entry for thread_alive.
        * exec.c (exec_ops): Likewise.
        * m3-nat.c (m3_ops): Likewise.
        * monitor.c (monitor_ops): Likewise.
        * procfs.c (procfs_ops): Likewise.
        * remote-arc.c (arc_ops): Likewise.
        * remote-array.c (array_ops): Likewise.
        * remote-e7000.c (e7000_ops): Likewise.
        * remote-es.c (es1800_ops, es1800_child_ops): Likewise.
        * remote-mips.c (mips_ops): Likewise.
        * remote-pa.c (remote_hppro_ops): Likewise.
        * remote-sim.c (gdbsim_ops): Likewise.
        * sparcl-tdep.c (sparclite_ops): Likewise.

More lynx-6100 work
1995-07-13 21:40:22 +00:00
Jim Wilson
37ea61215c Fix debug info bugs for SGI
* ecoff.c (add_file): Don't collapse multiple .file commands into
	a single file structure.
	(ecoff_build_lineno): Set ilineBase to sum of previous file's
	ilineBase and cline.
1995-07-13 19:00:19 +00:00
Ian Lance Taylor
3fe22b980b * aoutx.h (NAME(aout,slurp_reloc_table)): Cast argument to size_t
for malloc.
	* coff-mips.c (mips_relocate_section): Likewise, for memmove.
	(mips_relax_section): Likewise, for malloc.
	* cofflink.c (process_embedded_commands): Likewise.
	(_bfd_coff_final_link): Likewise.
	* ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
	(ecoff_final_link_debug_accumulate): Likewise.
	(ecoff_indirect_link_order): Likewise, for memcpy and malloc.
	(ecoff_reloc_link_order): Likewise, for malloc.
	* ecofflink.c (ecoff_align_debug): Likewise, for memset.
	(ecoff_write_symhdr): Likewise, for malloc.
	* elf32-hppa.c (elf32_hppa_read_symext_info): Likewise.
	* elf.c (assign_file_positions_except_relocs): Likewise, for
	qsort.
	* elf32-mips.c (mips_elf_read_ecoff_info): Likewise, for malloc.
	* elfcode.h (elf_slurp_reloc_table): Likewise.
	* elfcore.h (elf_corefile_note): Likewise.
	* elflink.h (elf_link_add_object_symbols): Likewise.
	(elf_link_read_relocs): Likewise.
	(NAME(bfd_elf,size_dynamic_sections)): Likewise, for memset.
	* i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
	* ieee.c (do_with_relocs): Likewise.
	* linker.c (default_indirect_link_order): Likewise, for malloc.
	* nlmcode.h (nlm_object_p): Likewise.
	(nlm_write_object_contents): Likewise.
	* oasys.c (oasys_set_section_contents): Likewise, for memcpy.
	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise,
	for malloc.
	* section.c (bfd_get_section_contents): Likewise, for memcpy.
	* srec.c (srec_get_section_contents): Likewise.
	(srec_set_section_contents): Likewise.
	* sunos.c (bfd_sunos_size_dynamic_sections): Likewise, for
	realloc and memset.
	(sunos_scan_relocs): Likewise, for malloc.
	(sunos_scan_dynamic_symbol): Likewise, for realloc.
	* syms.c (_bfd_generic_read_minisymbols): Likewise, for malloc.
	* versados.c (versados_get_section_contents): Likewise, for
	memcpy.
1995-07-13 18:14:45 +00:00
Ian Lance Taylor
047e0fcd8e * ldexp.c (exp_intop): Don't cast stat_alloc arg to bfd_size_type;
it takes a size_t anyhow.
	(exp_binop): Likewise.
	(exp_trinop): Likewise.
	(exp_unop): Likewise.
	(exp_nameop): Likewise.
	(exp_assop): Likewise.
	* ldlang.c (lang_memory_region_lookup): Likewise.
	(init_os): Likewise.
	(ldlang_add_undef): Likewise.
	(insert_pad): Likewise.
	* ldfile.c (ldfile_add_arch): Don't cast xmalloc arg to
	bfd_size_type.
1995-07-13 17:57:53 +00:00
Ian Lance Taylor
c9c49bd961 * Makefile.in (DISTSTUFF): Add arparse.h and sysinfo.h.
(mostlyclean): Remove y.output.
	(clean): Remove sysroff, sysroff.c, sysroff.h, and sysinfo.

	* nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t.
	* objcopy.c (copy_object): Likewise.
1995-07-13 17:50:55 +00:00
Ian Lance Taylor
2604db83a6 * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT.
(struct size_sym): Define.
	(show_stats): New static variable.
	(long_options): Add undocumented option "stats".
	(main): Print memory stats if requested.
	(sort_bfd, sort_dynamic, sort_x, sort_y): New static variables.
	(numeric_forward): Use minisymbols rather than asymbols.
	(non_numeric_forward): Likewise.
	(size_forward1): Rename from size_forward.  Use minisymbols.
	(size_forward2): New static function.
	(sort_symbols_by_size): Take new arguments dynamic, size, and
	symsizep.  Use minisymbols.  Don't store the size back in the
	symbol; store in a newly allocate struct size_sym array.
	(display_rel_file): Read minisymbols rather than asymbols.  Set
	sort_* variables.  Call print_size_symbols if sorting by size.
	(filter_symbols): Take new arguments dynamic and size.  Use
	minisymbols.
	(print_symbols): Likewise.  Call print_symbol for actual printing.
	(print_size_symbols): New static function.
	(print_symbol): New static function.
PR 5332.
1995-07-13 14:50:08 +00:00
Ian Lance Taylor
c3246d9b00 * targets.c (bfd_target): Add fields _read_minisymbols and
_minisymbol_to_symbol.
	(BFD_JUMP_TABLE_SYMBOLS): Add _read_minisymbols and
	_minisymbol_to_symbol.
	(bfd_read_minisymbols): Define.
	(bfd_minisymbol_to_symbol): Define.
	* syms.c (_bfd_generic_read_minisymbols): Define.
	(_bfd_generic_minisymbol_to_symbol): Define.
	* libbfd-in.h (_bfd_nosymbols_read_minisymbols): Define.
	(_bfd_nosymbols_minisymbol_to_symbol): Define.
	(_bfd_generic_read_minisymbols): Declare.
	(_bfd_generic_minisymbol_to_symbol): Declare.
	* bfd-in2.h: Rebuild.
	* libbfd.h: Rebuild.
	* aoutx.h (MINISYM_THRESHOLD): Define.
	(NAME(aout,read_minisymbols)): New function.
	(NAME(aout,minisymbol_to_symbol)): New function.
	* libaout.h (NAME(aout,read_minisymbols)): Declare.
	(NAME(aout,minisymbol_to_symbol)): Declare.
	* aout-target.h (MY_read_minisymbols): Define.
	(MY_minisymbol_to_symbol): Define.
	* All targets: Define read_minisymbols and minisymbol_to_symbol.
PR 5332.
1995-07-13 14:46:06 +00:00
Ian Lance Taylor
ac7530a895 * config/obj-coff.c (fixup_segment): Support MD_APPLY_FIX3. 1995-07-13 03:34:38 +00:00
Fred Fish
6942380809 * configure.in (configdirs): Remove gdb.chill from default list
of subdirs and then add it back in only if doing a native build.
	The current chill compiler does not yet work in any cross build.
1995-07-12 22:47:39 +00:00
Ken Raeburn
b818a3257f fix some compilation warnings from sun cc 1995-07-12 22:00:57 +00:00
Ken Raeburn
f7da4a99d4 fix more compilation bugs 1995-07-12 20:45:57 +00:00
Fred Fish
b49f423b73 * Revert all signal changes from Jul 6.
* gdb.base/{sigall.c signals.c}:  Define away signal() and alarm()
	for sh-hms targets, allowing these tests to link, with no other
	changes.  Testing is suppressed by setting "nosignals" in site.exp.
1995-07-12 17:27:40 +00:00
Ian Lance Taylor
395ccfce21 * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to
declaration.
	(ld_emulation_xfer_type): Add search parameter to
	open_dynamic_archive entry point.
	* ldemul.c (ldemul_open_dynamic_archive): Add search parameter.
	* ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and
	make non-static.  Change all callers to use new name.
	(ldfile_open_file_search): Make static.  If entry is dynamic, call
	ldemul_open_dynamic_archive.
	(ldfile_open_file): Don't call ldemul_open_dynamic_archive.
	* ldfile.h (ldfile_open_file_search): Don't declare.
	(ldfile_try_open_bfd): Declare.
	* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
	Accept search parameter.  Don't search for a library, just look in
	a single place.
	* emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive):
	Likewise.
1995-07-12 15:37:12 +00:00
Ian Lance Taylor
e4f35679a9 * objdump.c (dump_section_stabs): Only print each stabs section
once.
	(compare_relocs): Make it clear to gcc that this always returns a
	value.
1995-07-12 14:44:46 +00:00
Ian Lance Taylor
d1a917c56a Wed Jul 12 10:40:23 1995 H.J. Lu <hjl@nynexst.com>
* objcopy.c (simple_copy): Preserve errno on failure.
	(smart_rename): Print error mesage if simple_copy fails.
1995-07-12 14:42:08 +00:00
Ken Raeburn
50982f7f9d Initial autoconfiscation; attempting also to remove use of bfd's sysdep.h file. 1995-07-12 05:07:49 +00:00
Ken Raeburn
c403ad088b * libelf.h (elf_backend_data): Use unsigned, not unsigned char, for bitfields. 1995-07-12 04:29:47 +00:00
Ian Lance Taylor
f55900af7f * elf.c (bfd_section_from_shdr): In case SHT_REL[A], only get the
BFD section for the sh_link section if it is a SYMTAB section.
PR 7392.
1995-07-12 01:23:10 +00:00
Ian Lance Taylor
6c481b58a6 * aoutx.h (NAME(aout,link_add_symbols)): Don't bother to check
that archives hold a.out objects.
	* cf-i386lynx.c (coff_bfd_link_add_symbols): Don't define.
	(lynx_link_add_symbols): Remove.
	* cf-m68klynx.c (coff_bfd_link_add_symbols): Don't define.
	(lynx_link_add_symbols): Remove.
	* elflink.h (elf_bfd_link_add_symbols): Don't bother to check that
	archives hold ELF objects.
1995-07-11 21:22:17 +00:00
Ian Lance Taylor
0e75a8d6da * archive.c (bfd_generic_archive_p): If the archive has a map, and
the target was defaulted, but the first object in the archive can
	not be matched with that target, then return a bad format error.
1995-07-11 21:12:41 +00:00
Ian Lance Taylor
18bf5d5f2f * elf64-sparc.c (elf_sparc_howto_table): Set howto for WDISP16 to
elf64_wdisp16_reloc.
	(elf64_wdisp16_reloc): New static function.
	(elf64_sparc_relocate_section): New static function.
	(elf_backend_relocate_section): Define.
PR 7333.
1995-07-11 20:16:48 +00:00
Ian Lance Taylor
cf9fb9f243 * libelf.h (struct elf_size_info): Change type of last argument to
swap_symbol_out from char * to PTR.
	(bfd_elf32_swap_symbol_out): Update declaration.
	(bfd_elf64_swap_symbol_out): Likewise.
	* elfcode.h (elf_swap_symbol_out): Change type of cdst from char *
	to PTR.
	* elf.c (swap_out_syms): Cast to PTR, not char *, when calling
	swap_symbol_out routine.
	* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Likewise.
	(elf_link_output_sym): Likewise.
	(elf_link_output_extsym): Likewise.
	* elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Likewise.
1995-07-11 19:24:46 +00:00
Ian Lance Taylor
6804bd6c4c * doc/c-mips.texi: Document -m4010 and -mno-4010. 1995-07-11 18:32:16 +00:00
Ian Lance Taylor
e532b44c23 Tue Jul 11 14:28:55 1995 Jeff Spiegel <jeffs@lsil.com>
* config/tc-mips.c (mips_4010): New static variable.
	(interlocks): New static variable.
	(md_begin): Check for a cpu of "r4010".  Set mips_4010 correctly.
	If mips_4650 or mips_4010, set interlocks.
	(append_insn): Check interlocks, not mips_4650.
	(mips_emit_delays): Likewise.
	(mips_ip): Only permit INSN_4010 instructions if mips_4010.
	(md_longopts): Add "m4010" and "no-m4010".
	(md_parse_option): Accept -mcpu=r4010.  Handle -m4010 and
	-no-m4010.
	(md_show_usage): Document -m4010 and -no-m4010.
1995-07-11 18:30:25 +00:00
Ian Lance Taylor
89abbf9d2c Tue Jul 11 14:23:37 1995 Jeff Spiegel <jeffs@lsil.com>
* mips-opc.c (L1): Define.
	(mips_opcodes): Add R4010 instructions: flushi, flushd, flushid,
	addciu, madd, maddu, ffc, ffs, msub, msubu, selsi, selsr, waiti,
	and wb.

Tue Jul 11 11:49:49 1995  Ian Lance Taylor  <ian@cygnus.com>

	* mips-opc.c (mips_opcodes): For the move pseudo-op, prefer daddu
	if ISA 3 and addu otherwise, replacing or, since some MIPS chips
	have multiple add units but only a single logical unit.
1995-07-11 18:25:27 +00:00
Ian Lance Taylor
e5fa3f23e8 * ecoff.c (struct efdr): Add new field fake.
(init_file): Initialize fake.
	(add_file): Add new parameter fake.  Change all callers.
	(ecoff_build_debug): Don't warn about a missing .end for a fake
	file.
PR 6509.
1995-07-11 17:26:08 +00:00
Ian Lance Taylor
6f904fce87 Tue Jul 11 12:29:49 1995 Rick Sladkey <jrs@world.std.com>
* elf.c (_bfd_elf_find_nearest_line): Handle the simple case where
	there is no debugging information.
1995-07-11 16:31:39 +00:00
Ian Lance Taylor
917199fe29 * ldmisc.c (vfinfo): Don't print the line number if it isn't
meaningful.
1995-07-11 16:30:02 +00:00
Ian Lance Taylor
141b9f1bbe * ppc-opc.c (powerpc_operands): Change CR to use a bitsize of 3,
shifted by 18, without any insertion or extraction function.
	(insert_cr, extract_cr): Remove.
1995-07-11 15:52:03 +00:00
Ian Lance Taylor
a89d9f5bf1 * ld.h (ld_config_type): Add field warn_constructors.
* ldmain.c (add_to_set): Warn if config.warn_constructors.
	(constructor_callback): Likewise.
	* lexsup.c (parse_args): Handle -warn-constructors.
	* ld.texinfo, ld.1: Document -warn-constructors.
PR 7406.
1995-07-10 22:16:12 +00:00
Ian Lance Taylor
c16b92d224 * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Don't
get confused by directory names if we searched for the file.
PR 7401.
1995-07-10 22:01:03 +00:00
Ian Lance Taylor
7213def760 Based on patches from H.J. Lu <hjl@nynexst.com>:
* ldlang.h (lang_input_statement_type): Add new field dynamic.
	* ldlang.c (new_afile): Set dynamic from config.dynamic_link.
	* ldfile.c: Include bfdlink.h.
	(ldfile_open_file): Check dynamic field of entry, not global
	dynamic_link field.  Don't do a dynamic search when doing a
	relocateable link.
	* ldmain.c (main): Don't warn about dynamic_link for a
	relocateable link.
	* emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Skip file if
	dynamic is false.
	(gld${EMULATION_NAME}_create_output_section_statements): Always
	loop over input files.
	* Makefile.in: Rebuild dependencies.
1995-07-10 21:16:40 +00:00
Ken Raeburn
db8e56dc13 split cpu-specific documentation out to separate files 1995-07-10 20:54:42 +00:00
Ken Raeburn
cc02a8a9c6 * read.c (po_hash): Now static. 1995-07-10 20:49:45 +00:00
Ian Lance Taylor
fb33961bff Based on patches from H.J. Lu <hjl@nynexst.com>:
* config/tc-i386.c (md_apply_fix3): Rename from md_apply_fix1.
	Accept pointer to value and segment.  Fix OBJ_ELF PCREL case to
	handle global defined symbols correctly.
	(md_apply_fix): Remove both versions.
	* config/tc-i386.h (MD_APPLY_FIX3): Define.
1995-07-10 19:01:21 +00:00
Ian Lance Taylor
9ab8a0e87b * coff-arm.c (PCRELOFFSET): Define if not already defined.
* Makefile.in: Rebuild dependencies.
	(BFD32_BACKENDS): Add coff-arm.o
	(CFILES): Add coff-arm.c, pe-arm.c, pei-arm.c.
1995-07-10 18:24:39 +00:00
Ian Lance Taylor
56fd39e800 * cofflink.c (_bfd_coff_generic_relocate_section): Remove unused
local i.
	* coff-arm.c (coff_arm_rtype_to_howto): Don't declare.
1995-07-10 18:16:25 +00:00
Ian Lance Taylor
921fc2819c * coff-i960.c (coff_i960_relocate): Correct typo: use ! on strcmp,
not on string.
1995-07-10 18:11:13 +00:00
Ian Lance Taylor
e336470145 * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
using bfd_alloc, not malloc.
	* cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
	* ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
	* i386linux.c (linux_link_hash_table_create): Likewise.
	* linker.c (_bfd_generic_link_hash_table_create): Likewise.
	* sunos.c (sunos_link_hash_table_create): Likewise.
1995-07-10 18:07:17 +00:00