Commit Graph

1118 Commits

Author SHA1 Message Date
Stan Shebs bb99a7328c * i386mach3.c: Reverted to version from before Jul 5 1994 changes.
Un-break gas/binutils/ld for FSF.
1994-07-22 00:28:17 +00:00
Ian Lance Taylor f42fe1599a * reloc.c (struct reloc_howto_struct): Remove special_function1.
It's the wrong way to do things.
	(HOWTO): Change accordingly.
	(HOWTO2): Remove.
	(_bfd_final_link_relocate): Remove references to
	special_function1.
	* bfd-in2.h: Rebuilt.
	* aoutx.h (aout_link_input_section_std): Remove references to
	special_function1.
	(aout_link_reloc_link_order): Likewise.
1994-07-21 16:34:59 +00:00
Ian Lance Taylor bf73e4f3fe * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Define.
* elfcode.h (elf_link_add_object_symbols): If symbol is defined as
	weak, set ELF_LINK_HASH_DEFINED_WEAK.
	(elf_link_output_extsym): If symbol is defined as weak, mark it
	STB_WEAK.
1994-07-17 02:15:24 +00:00
Ian Lance Taylor ea61717495 * libelf.h (struct bfd_elf_section_data): Add relocs field.
(shdr_name): Remove; unused.
	* elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL
	and RELA relocs.  Free up the unswapped relocs.  Permit the relocs
	to be cached in the section_data.  Correct the reloc address.
	(elf_slurp_reloca_table): Remove.
	(elf_canonicalize_reloc): Rewrote.
	(elf_link_input_bfd): Permit the relocs to be cached in the
	section data.
1994-07-17 01:15:42 +00:00
Stan Shebs d9840ab79e * config.bfd (m88*-harris-cxux*): Recognize.
* hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
1994-07-16 21:08:41 +00:00
Stan Shebs ef8b133d8c * configure.host (m68*-atari-sysv4*): New host.
(m68*-cbm-sysv4*): Use m68kv4 instead of amix.
	* hosts/amix.h: Remove.
	* hosts/m68kv4.h: New file, was amix.h.
1994-07-16 21:02:53 +00:00
Ken Raeburn 1fb83be62b NS32K changes from Ian Dall.
Note: Some of the ns32k-specific files do require gcc to compile at present.
This will be fixed.
1994-07-14 21:35:54 +00:00
Stan Shebs a307efdfac * coff-sparc.c (sparccoff_vec): Have leading underscores. 1994-07-14 18:50:22 +00:00
Peter Schauer 57a814a93e * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,
hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c,
	rs6000-core.c, trad-core.c:  Remove SEC_ALLOC flag from .reg
	sections, .reg sections are not allocated and contain debug
	information only.
	* osf-core.c (make_bfd_asection, osf_core_core_file_p):  Use
	bfd_make_section_anyway instead of building unique section names.
1994-07-12 19:14:09 +00:00
Ian Lance Taylor 840846dac5 * libelf.h (bfd_elf32_swap_symbol_in): Declare.
(bfd_elf32_swap_symbol_out): Declare.
	(bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare.
	* elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
1994-07-12 16:13:05 +00:00
Ian Lance Taylor 42ec46c361 * aout-encap.c (ARCH): Don't define. Obsolete.
* aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise.
	* i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise.
	* i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise.
	* newsos3.c, sparclynx.c, sunos.c: Likewise.
1994-07-12 15:46:32 +00:00
Ian Lance Taylor 18938e4d3e * section.c (STD_SECTION): Make the sixth argument boolean, not
the seventh.  From gary@tuva.pacsemi.oz.au (gary kopff).
1994-07-12 00:12:19 +00:00
David Henkel-Wallace 4852416e2a Sun Jul 10 09:12:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
* aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE
        in order not to collide with LynxOS's definition of FREE in
        /usr/include/sys/proc.h
1994-07-10 16:15:07 +00:00
Peter Schauer fd4913f196 * aoutx.h (howto_table_std): Add entry for GOT relocations
which are present in sun3 shared libraries, to avoid assertions
	when reading the dynamic relocations.
1994-07-07 17:11:58 +00:00
Jeff Law 48530c25d3 * som.h (R_HPPA_COMPLEX): Fix dumb typo. 1994-07-07 16:22:01 +00:00
Ian Lance Taylor 874a43273c * elfcode.h (elf_link_output_sym): Don't call output_symbol_hook
if it is NULL.
1994-07-06 23:33:02 +00:00
Peter Schauer 5fb54939a9 * coff-alpha.c (alpha_ecoff_mkobject_hook): New hook to
additionally copy object type information from the alpha file
	header to the BFD flags.
	(alpha_ecoff_backend_data):  Use it.
	(ecoffalpha_little_vec):  Add DYNAMIC to object_flags.
	* aout64.c:  Fix typo in conditional QMAGIC definition.
1994-07-06 07:53:31 +00:00
Jeff Law 2c0f3abc50 * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check the
value of clicksz to help weed out non HPPA BSD core files.
1994-07-06 06:17:06 +00:00
Stan Shebs 11676adc14 Mach 3 support.
* config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*):
	New targets.
	* configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize
	"mach3" instead of "mach".
	(m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts.
	* targets.c (m88kmach3_vec): New target vector.
	(bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but
	inside #if 0.
	* aoutx.h (some_aout_object_p) [MACH]: Recognize executables by
	checking for execute permission, instead of looking at entry
	point.
	* i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR,
	N_SHARED_LIB, don't include aout/*.h files, etc.
	* m88kmach3.c: New file, m88k Mach 3 target.
	* config/m88k-mach3.mt,	config/mips-mach3.mt: New files, target
	makefile fragments.
	* config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh:
	New files, host	makefile fragments.
	* hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
1994-07-05 21:50:43 +00:00
Ian Lance Taylor 71edd06df7 * elfcode.h (swap_out_syms): Get alignment of common symbol from
st_value field of saved ELF symbol information, if there is any.
1994-07-05 18:05:03 +00:00
Jeff Law edf7c1e4fe * som.h (R_HPPA_COMPLEX): Define.
* elf32-hppa.h (R_HPPA_COMPLEX): Define.
	(elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
1994-07-05 01:19:31 +00:00
Steve Chamberlain eeaed1957a * section.c (bfd_get_section_contents): Put in parens to get
precedence right.
1994-06-28 01:09:50 +00:00
Peter Schauer 5e16521ab7 Add Solaris BCP (the part of Solaris which allows it to run
SunOS4 a.out files) core file handling.
	* aoutf1.h (external_solaris_bcp_core, swapcore_solaris_bcp):
	New structure and its swap in function.
	(internal_sunos_core):  New member c_data_addr, to receive the
	start address of the data section in the core file.
	(swapcore_sun3, swapcore_sparc, sunos4_core_file_p):  Use it.
	(sunos4_core_file_p):  Recognize Solaris BCP core file.
	(sunos4_core_file_matches_executable_p):  Always indicate match
	for Solaris BCP core files.
1994-06-24 16:18:35 +00:00
Ian Lance Taylor 8af74670df Preliminary support for generating shared libraries, from Eric
Youngdale <ericy@cais.cais.com>.
	* elfcode.h (prep_headers): If DYNAMIC, set e_type to ET_DYN.
	(elf_link_add_object_symbols): If generating a shared library,
	create dynamic sections for first input BFD with the right format.
	(elf_link_create_dynamic_sections): Don't create .interp section
	if creating a shared library.
	(elf_link_input_bfd): Skip dynamic sections in input file.
	(elf_bfd_final_link): If creating a shared library, it's OK for
	dynobj to have sections which are not SEC_IN_MEMORY.
	* elf32-i386.c (elf_i386_size_dynamic_sections): Only set .interp
	section if not creating a shared library.
	* elf32-sparc.c (elf_sparc_size_dynamic_sections): Likewise.
1994-06-23 21:36:03 +00:00
Ian Lance Taylor 51fc377bab * elfcode.h (elf_object_p): Don't set DYNAMIC just because there
is an SHT_DYNAMIC section.
1994-06-23 20:14:58 +00:00
David MacKenzie 1f8b3b5746 Change --with-targets to --enable-targets, per GNU coding standards. 1994-06-23 20:08:57 +00:00
Ian Lance Taylor 135a68152c * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
pass from abfd->archive_pass, and save it there as well.
1994-06-23 00:36:38 +00:00
Ken Raeburn 2e66a62730 linker.c (FAIL): Undefine macro before defining as enum. 1994-06-23 00:10:06 +00:00
Ken Raeburn 3bf36e67e2 config.bfd (powerpc-*-elf*): New target, like powerpc-*-sysv4*. 1994-06-22 23:40:17 +00:00
Ian Lance Taylor a537cb21bb * hash.c (bfd_hash_allocate): Don't call bfd_set_error if
obstack_alloc returns NULL unless the size is non-zero.

	* linker.c (archive_hash_allocate): Define.
	(_bfd_generic_link_add_archive_symbols): Use archive_hash_allocate
	rather than obstack_alloc, for clarity.
1994-06-22 22:37:54 +00:00
Ian Lance Taylor 66f2c66f93 * elfcode.h (elf_get_reloc_upper_bound): Correct. 1994-06-22 20:00:05 +00:00
Ian Lance Taylor d81843e864 * aout64.c (BMAGIC, QMAGIC): Define if not already defined. From
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
1994-06-22 19:38:57 +00:00
Ian Lance Taylor 0630aba528 Linux ZMAGIC support from Eric Youngdale <ericy@cais.cais.com>.
* libaout.h (struct aoutdata): Add field zmagic_disk_block_size.
	* aout-target.h (MY(callback)): Only set alignment according to
	architecture if the section sizes are aligned to that alignment,
	for backward compatibility.
	(MY(set_sizes)): Initialize zmagic_disk_block_size field.
	* aoutx.h (adjust_z_magic): Set ztih if using q_magic_format.  Set
	text section filepos to zmagic_disk_block_size if not ztih.  Use a
	different padding algorithm if not ztih.
	* i386linux.c (MY_text_includes_header): Don't define.
1994-06-22 19:13:55 +00:00
Ian Lance Taylor 4587b57831 * aoutx.h (aout_link_check_ar_symbols): Just skip N_STAB and N_FN
symbols; don't look them up in the hash table.  From
        ralphc@pyramid.com (Ralph Campbell).
1994-06-22 14:55:58 +00:00
Ian Lance Taylor badd23e323 * section.c (bfd_abs_section): Make const.
(bfd_abs_section_ptr, bfd_is_abs_section): Define.
	(bfd_und_section): Make const.
	(bfd_und_section_ptr, bfd_is_und_section): Define.
	(bfd_com_section): Make const.
	(bfd_com_section_ptr): Define.
	(bfd_ind_section): Make const.
	(bfd_ind_section_ptr, bfd_is_ind_section): Define.
	(bfd_abs_symbol, bfd_com_symbol): Make const.
	(bfd_und_symbol, bfd_ind_symbol): Likewise.
	(global_syms): Cast initialization of section field.
	(STD_SECTION): Define as const, and cast initializations.
	* bfd-in2.h: Rebuilt.
	* Many files: Change uses of bfd_abs_section, etc., to use
	bfd_abs_section_ptr or bfd_is_abs_section, etc.
1994-06-21 16:47:07 +00:00
Ian Lance Taylor 2f3508ad05 * Many files: change all bfd_target vectors to be const. Change
all uses of bfd_target * to be const bfd_target *.  Change
	bfd_target_vector and bfd_default_vector arrays to be const
	bfd_target * const *.
1994-06-20 21:55:45 +00:00
Ian Lance Taylor 75f3ef7a63 * ecoff.c, libecoff.h, ecoffswap.h, coff-alpha.c, coff-mips.c,
elf32-mips.c: Renamed all externally visible ECOFF routines which
	are local to BFD to start with _bfd_ecoff instead of just ecoff.
1994-06-20 19:39:15 +00:00
Ian Lance Taylor aac6b32f31 * ecoff.c (ecoff_swap_tir_in): Change input argument to const.
(ecoff_swap_tir_out): Likewise.
	(ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
	(ecoff_slurp_symbolic_info): Add new arguments to correspond to
	read_debug_info entry point in ecoff_debug_swap structure.
	Change all calls.
	* libecoff.h (ecoff_slurp_symbolic_info): Change declaration.
	* ecoffswap.h (ecoff_swap_tir_in, ecoff_swap_tir_out): Declare.
	(ecoff_swap_rndx_in, ecoff_swap_rndx_out): Declare.
	* coff-alpha.c (alpha_ecoff_backend_data): Initialize new
	ecoff_debug_swap fields.
	* coff-mips.c (mips_ecoff_backend_data): Likewise.
	* elf32-mips.c (mips_elf_read_ecoff_info): Undefine READ.
	(mips_elf_ecoff_debug_swap): Initialize new ecoff_debug_swap
	fields.
	* configure.in (bfd_elf32_bigmips_vec): Use ecoff.o and
	ecofflink.o.
	(bfd_elf32_littlemips_vec): Likewise.
	(ecoff_big_vec, ecoff_little_vec): Likewise.
	(ecoffalpha_little_vec): Likewise.
	* Makefile.in (BFD_LIBS): Remove ecoff.o and ecofflink.o.
	(BFD32_BACKENDS): Add ecoff.o and ecofflink.o.
1994-06-20 18:26:55 +00:00
Ian Lance Taylor 6c8fa8e62c * aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
when computing reloc sizes.  From Eric Youngdale
	<ericy@cais.cais.com>.
	* elfcode.h (elf_bfd_final_link): Don't try to compute maximum
	reloc count or size for a non-ELF file.
1994-06-20 15:51:28 +00:00
Ian Lance Taylor 6fea065949 * mipsbsd.c (MY_final_link_callback): Define to avoid warning. 1994-06-20 15:25:58 +00:00
Ian Lance Taylor 263a3f176a * hp300hpux.c (MY_final_link_callback): Define to avoid warning.
(BMAGIC, QMAGIC): Define; used by aoutx.h.
	(MY(slurp_symbol_table)): Change translate_from_native_sym_flags
	calls to use new parameters.
1994-06-20 15:11:34 +00:00
Ian Lance Taylor 785e2b52bc * aout-target.h (MY(callback)): Set the alignments of the text,
data and bss sections after determining the architecture.
1994-06-17 18:49:39 +00:00
Jeff Law 9fefc1befc * libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE. 1994-06-17 18:11:17 +00:00
Jeff Law 83b69190b3 * elf32-hppa.h (elf_hppa_final_processing): Delete decl. 1994-06-17 17:18:25 +00:00
Jeff Law c46b8ed7e6 * elfcode.h (elf_link_input_bfd): Don't try to read local symbols
if there aren't any in the input file.
1994-06-17 05:39:55 +00:00
Ian Lance Taylor e3400040fa * config.bfd: If second argument is ``_'', then, instead of
echoing config file name, echo whether target uses leading
	underscores on symbol names.  Add appropriate settings to
	different cases.  Used by binutils/configure.in to set default for
	c++filt.
1994-06-16 21:58:48 +00:00
Ian Lance Taylor 0ff5d3a69a * elfcode.h (elf_bfd_final_link): If trying to generate a shared
object, warn and return false.
1994-06-16 19:30:49 +00:00
Ian Lance Taylor 04003b573d Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
* i386linux.c: Many new functions and definitions for linker
	support for Linux shared libraries.
	* bfd-in.h (bfd_linux_size_dynamic_sections): Declare.
	* bfd-in2.h: Rebuild.
1994-06-16 18:29:21 +00:00
Ian Lance Taylor c1f84521bf * libelf.h (struct elf_obj_tdata): New field dt_needed_name.
(elf_dt_needed_name): New accessor macro.
	* elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
	is set, use that instead of the filename for the DT_NEEDED dynamic
	entry.
	* elf.c (bfd_elf_set_dt_needed_name): New function.
	* bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
	* bfd-in2.h: Rebuilt.
1994-06-16 00:01:32 +00:00
Ken Raeburn 485dc654e2 comment on v9 stuff 1994-06-15 23:27:54 +00:00