Commit Graph

243 Commits

Author SHA1 Message Date
Ian Lance Taylor b7577823b6 * configure.in: Call AC_CONFIG_HEADER. Substitute
HOST_64BIT_LONG.  Check that various header files exist.  Check
	that fcntl exists.  Call BFD_BINARY_FOPEN.  Check whether malloc
	and/or free need to be declared.  Don't make a link to sysdep.h.
	Define TRAD_HEADER for various hosts.
	* configure: Rebuild.
	* configure.host: Don't set my_host.  Add definitions taken from
	host header files for various entries.  Remove entries which now
	do nothing.
	* acconfig.h: New file.
	* config.h.in: New file, built by autoheader.
	* sysdep.h: New file.
	* Makefile.in (do_distclean): Don't remove sysdep.h.
	(RECONFIG): Remove.
	(LOCAL_H_DEPS): New variable.
	($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
	$(RECONFIG).
	($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
	($(OPTIONAL_BACKENDS)): Likewise.
	(stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
	looking through sysdep.h.
	* bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
	(BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
	(fprintf_vma, sprintf_vma): Likewise.
	(int64_type, uint64_type): Don't define.
	* bfd-in2.h: Rebuild.
	* archures.c, bfd.c, srec.c: Include <ctype.h>.
	* elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
	* lynx-core.c: Include stuff from old hosts/lynx.h.
	* opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
	rather than NO_FCNTL.
	* targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
	rather than NATIVE_HPPAHPUX_COMPILER.
	* trad-core.c: Don't include <errno.h>.  Include TRAD_HEADER if it
	is defined.
	* hosts/*.h: Remove all header files which merely include,
	declare, and define things.  Leave header files which define
	information needed by trad-core.c.
1995-09-06 22:53:43 +00:00
Jeff Law 0a552864e8 * configure.host: Recognize aix4 explicitly.
* rs6000-core.c (CORE_DATA_SIZE_FIELD): New macro to get a the size
        of a core dump's data section.  Provide alternate definition for aix4.
        (SAVE_FIELD): Similarly for save state field (register info).
        (STACK_END_ADDR): Provide definition suitable for aix4.
        * config/{aix4.mh,aix4.mt}: New configuration files.
        * hosts/aix4.h: Likewise.

Mike's aix4 changes, slightly modified.
1995-08-08 17:31:52 +00:00
Fred Fish e365a606ed * hosts/i386v4.h (getgid, getuid): Change prototypes to be
compatible with Unixware 1.x and Unixware 2.x, and probably other
	i386 svr4 versions as well.
1995-07-20 19:57:07 +00:00
Steve Chamberlain bd676d26ea Mon Jul 3 13:55:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
* config.bfd (win32): New configuration.
	* configure.host (pe): Changed to i386win32.
	* config/i386pe.mh: Deleted.
	* config/i386win32.mh: New file.
1995-07-03 21:11:15 +00:00
Steve Chamberlain 89665c8562 Wed Jun 28 18:04:42 1995 Steve Chamberlain <sac@slash.cygnus.com>
* Makefile.in: versados.o is now conditionally built.
	* coffcode.h (add_data_entry): New function.
	(coff_write_object_contents): Clean up. Calculate
	data entries.
	* cofflink.c (_bfd_coff_generic_relocate_section):
	.reloc and .edata sections are IMAGE_BASED too.
	If there's a base_file then write out base information.
	* configure.host (i386-*-pe): New.
	* syms.c (coff_section_type): Only scan prefixes.
	* targets.c (bfd_target_vector): Versados is now conditionally
	built.
	* config/m68k-coff.mt: Build versados.o
	* hosts/i386pe.h: New file.
1995-06-29 01:17:58 +00:00
Jason Molenda 0c3c868b2b * hosts/std-host.h: #include ansidecl.h 'cause PTR is used in
std-host.h.
1995-04-25 18:07:43 +00:00
Michael Meissner 423b654e17 Provide escape hatch for HAVE_PROCFS being defined. 1995-04-24 14:38:05 +00:00
Ken Raeburn 1f2025d9c1 Patches from H.J. Lu for Linux ELF core file support.
* elfcode.h (elf_core_file_matches_executable_p) [HAVE_PROCFS]: Use prpsinfo_t
instead of struct prpsinfo, for consistency.
* hosts/i386linux.h (HAVE_PROCFS): Define.
1995-04-21 16:53:57 +00:00
Stan Shebs 241d8883ed Always keep all MPW support files 1995-04-04 19:53:04 +00:00
Stan Shebs ab62d0499e * hosts/mpw.h (SEEK_SET, SEEK_CUR, BYTES_IN_PRINTF_INT):
Remove definitions.
	(mpw_fread, mpw_fwrite): Declare, define as substitutes
	for fread and fwrite.
1995-03-04 00:47:01 +00:00
Ian Lance Taylor ebb6075d2a * hosts/sysv4.h: Include <unistd.h>, <stdlib.h>, and <time.h>.
Only define SEEK_SET and SEEK_CUR if they are not already defined.
	Remove all external function declarations.
1995-02-17 18:35:40 +00:00
Ian Lance Taylor fe46552d89 * hosts/std-host.h: Remove all function declarations which return
int or void, except the one for free.
1995-02-16 18:23:57 +00:00
Stan Shebs 223e83068b * hosts/mpw.h: Include spin.h. 1994-12-15 22:08:53 +00:00
J.T. Conklin ec35a1c2f3 NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
* config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
* configure.in (m68knetbsd_vec): Added.
* targets.c (bfd_m68knetbsd_vec): Added.
* hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
* Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.

miscellaneous cleanup required by all netbsd targets, based on work
by Andrew Cagney <cagney@highland.com.au>:
* netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
  N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed.  Generic a.out
  definitions work.
* i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
  (MY(write_object_contents)): Use NetBSD's magic numbers
1994-10-28 18:11:15 +00:00
J.T. Conklin 1c1d90f1fe Updated for recent NetBSD changes 1994-09-14 20:26:54 +00:00
J.T. Conklin a3f7a777c6 * configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.

* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
  host support.

* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.

* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.

* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
  config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
  file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
Stan Shebs 5e766076dc * mpw-make.in (ctor.c): Remove references.
* hosts/mpw.h [BFD_TRUE_FALSE]: Remove macro redefinitions of true
	and false.
1994-09-12 23:54:12 +00:00
Ian Lance Taylor 098e8a89ec * configure.host (sparc-*-solaris2*): Use solaris2, not sysv4.
The linker depends upon configuring for solaris2.
	* hosts/solaris2.h: New file; include hosts/sysv4.h.
	* config/solaris2.mh: New file; copy of config/sysv4.mh.
1994-08-12 15:28:19 +00:00
Ian Lance Taylor f3817a52e5 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
* hosts/solaris2.h: Remove.
	* config/solaris2.mh: Remove.
1994-08-01 16:35:40 +00:00
Ian Lance Taylor abc61566c0 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
* hosts/solaris2.h: Remove.
	* config/solaris2.mh: Remove.
1994-08-01 16:16:47 +00:00
Stan Shebs 56fbe88919 Update to reflect comings and goings of ns32k and mach-related files 1994-07-25 20:04:11 +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
Ian Lance Taylor 7a769b7ffa * hosts/sysv4.h (qsort, strtol): Don't declare. 1994-07-06 23:28:31 +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 2855b89fe2 * hosts/sun3.h: Include <stdlib.h>. Don't declare free, exit or
getenv.
1994-06-02 22:39:31 +00:00
Ian Lance Taylor 220642fd47 * hosts/sun3.h: Don't declare qsort, malloc or realloc. 1994-06-01 18:39:43 +00:00
Stan Shebs 380c60b19a Tue Apr 26 15:07:24 1994 Stan Shebs (shebs@andros.cygnus.com)
* cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
	* coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
	(COFF_SPARC): Define.
	* coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
	power of data and bss sections to 3.
	* hosts/lynx.h (__LYNXOS): Define.

Brought over from 94Q1.
1994-04-26 22:10:10 +00:00
Ken Raeburn 71363c410e * hosts/i386aix.h: Changes to avoid prototypes conflicts with the ones defined
in stdlib.h.  (From Minh Tran-Le.)
1994-04-20 22:42:57 +00:00
Stan Shebs 117dbbc609 Tue Apr 5 17:54:07 1994 Stan Shebs (shebs@andros.cygnus.com)
* hosts/mpw.h (CLOSE_BEFORE_UNLINK): Define.
1994-04-06 00:55:51 +00:00
Jim Kingdon 471c3c3f74 * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.
* config/sysv4.mh: Add comment.
	* config/symmetry.mh: Change comment.
	* configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
1994-03-26 01:12:53 +00:00
Jim Kingdon 80425e6c82 * libbfd-in.h: Remove alloca cruft. It was missing some necessary
cruft (like the #pragma alloca for AIX).
	In addition to that problem, the C alloca calls xmalloc, which
	means checking for being out of memory can't work right.  The
	following changes remove all uses of alloca from BFD.
	* hosts/solaris2.h: Remove alloca cruft.
	* som.c: Replace alloca with a fixed size auto array.
	* aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
	ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c:
	Replace alloca with malloc and appropriate error checking and
	freeing.
	* linker.c: Replace alloca with obstack_alloc.
	* libbfd.h: Rebuilt.
1994-03-10 02:09:10 +00:00
Ian Lance Taylor 86dbb1303f * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
declarations.
1994-02-26 05:35:43 +00:00
Stan Shebs 30d7f715a9 Wed Feb 23 16:52:51 1994 Stan Shebs (shebs@andros.cygnus.com)
* hosts/mpw.h (fstat): Declare.
	(mpw_fstat): Eliminate mentions.
1994-02-24 00:56:32 +00:00
Ian Lance Taylor aaca79a831 * hosts/hp300.h: Include <stdlib.h>; don't declare free. 1994-02-22 01:51:38 +00:00
Stu Grossman fdf08b0fff Oops... Forgot to check this in... 1994-02-21 19:05:44 +00:00
Stan Shebs 848743c1b6 Tue Feb 15 12:44:30 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-make.in (CSEARCH): Add include/mpw to search path.
	* hosts/mpw.h (stat): Remove incomplete definition, now in
	include/mpw/sys.
	(POSIX_UTIME): Define.
1994-02-15 20:48:53 +00:00
Stu Grossman 7d8752123a * coff-rs6000.c: Add Lynx core file support, use HOST_AIX, where
appropriate.
	* rs6000-core.c:  Use HOST_AIX instead of COREFILES_PLEASE.
	* config/rs6000.mh:  Remove defs of ARCHIVES_PLEASE and
	COREFILES_PLEASE.
	* config/rs6000lynx.mh:  Turn on Lynx core file support.
	* hosts/rs6000.h:  #define HOST_AIX.
	* hosts/rs6000lynx.h:  Create this to enable Lynx host support.
1994-02-15 01:30:25 +00:00
Jeff Law 1c8c89a8b2 New host configuration file. 1994-02-08 04:58:32 +00:00
Jim Kingdon 96ad107bcc * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
1994-02-03 03:31:22 +00:00
Ken Raeburn dc3da58f2c * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete typedefs,
since HOST_64_BIT will take care of defining them in bfd.h.
1994-01-21 02:00:05 +00:00
Ken Raeburn 5802eb8f93 (sprintf_vma, fprintf_vma): New macros.
(uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so they get copied
to bfd.h.
1994-01-19 22:35:48 +00:00
Stan Shebs e4c7516baa Set lose_these_too correctly 1994-01-11 01:15:02 +00:00
David D. Zuhn 0b0dbdfc8a fix comment delimiters 1994-01-05 19:35:44 +00:00
Stan Shebs d60e8a540e Mon Jan 3 10:59:28 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW version of configure.in.
	* mpw-make.in: New file, MPW version of Makefile.in.
	* hosts/mpw.h: New file, MPW host definitions.
1994-01-04 00:34:05 +00:00
Ian Lance Taylor 4c3721d514 Extensive changes to move the bulk of the linker into BFD so that
more efficient backend code can be written for specific object
	files.  Only existing efficient backend is a.out.
	* seclet.c, seclet.h: Removed.
	* hash.c, linker.c, genlink.h: New files.
	* bfd-in.h: Removed bfd_error_vector.  Declared hash table
	structures and functions.
	(JUMP_TABLE): Removed bfd_seclet_link, added
	bfd_link_hash_table_create, bfd_link_add_symbols and
	bfd_final_link.
	* All backends: Changed accordingly.
	* bfd-in2.h: Rebuilt.
	* bfd.c (struct _bfd): Added link_next and archive_pass fields.
	Removed ld_symbols field.
	(bfd_nonrepresentable_section, bfd_undefined_symbol,
	bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
	bfd_error_vector): Removed.
	(bfd_default_error_trap, bfd_error_trap,
	bfd_error_nonrepresentabltrap): Removed.
	(bfd_get_relocated_section_contents): Pass link_info.  Pass
	link_order instead of seclet.  Pass symbols.
	(bfd_relax_section): Pass link_info.
	(bfd_seclet_link): Removed.
	(bfd_link_hash_table_create, bfd_link_add_symbols,
	bfd_final_link): New macros.
	* libbfd-in.h: If __GNUC__ is defined and alloca is not, define
	alloca as __builtin_alloca.  Declare internal linking functions.
	* libbfd.h: Rebuilt.
	* libbfd.c (bfd_seek): Comment out fseek assertion.  It's worked
	for months.
	* reloc.c (reloc_howto_type): Added error_message argument to
	special_function field.  Changed all callers and all definitions.
	(bfd_get_reloc_size): Make argument a const pointer.
	(bfd_perform_relocation): Add error_message argument to hold
	string set if return value if bfd_reloc_dangerous.  Changed all
	callers.
	(_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
	* section.c (asection): Renamed seclets_head and seclets_tail to
	link_order_head and link_order_tail.
	* targets.c (bfd_target): Replaced seclet argument with link_info
	and link_order and symbols arguments in
	bfd_get_relocated_section_contents.  Added symbols argument to
	bfd_relax_section.  Removed bfd_seclet_link.  Added
	bfd_link_hash_table_create, bfd_link_add_symbols and
	bfd_final_link.
	* libaout.h (struct aoutdata): Added external_syms,
	external_sym_count, external_strings, sym_hashes fields.
	(obj_aout_external_syms, obj_aout_external_sym_count,
	obj_aout_external_strings, obj_aout_sym_hashes): New accessor
	macros.
	(WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
	* aoutx.h: Wrote new back end linker routines.
	(translate_to_native_sym_flags): Return boolean value.  Don't use
	bfd_error_vector.
	(NAME(aout,write_syms)): Return boolean value.  Check return value
	of translate_to_native_sym_flags and bfd_write.
	* aout-target.h (final_link_callback): New function.
	(MY_bfd_final_link): New function.
	* aout-adobe.c (aout_adobe_write_object_contents): Check return
	value of aout_32_write_syms.
	* hp300hpux.c (MY(write_object_contents)): Likewise.
	* i386lynx.c (WRITE_HEADERS): Likewise.
	* libaout.h (WRITE_HEADERS): Likewise.
	* bout.c: Changed functions to use link_info->callbacks rather
	than bfd_error_vector, and link_orders rather than seclets.
	* coff-alpha.c: Likewise.
	* coff-h8300.c: Likewise.
	* coff-h8500.c: Likewise.
	* coff-sh.c: Likewise.
	* coff-z8k.c: Likewise.
	* elf32-hppa.c: Likewise.
	* reloc16.c: Likewise.
	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
	up _gp in the hash table rather than in outsymbols.
	* coff-a29k.c (a29k_reloc): Pass errors back in new error_message
	argument rather than printing them.
	* coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
	link_order arguments rather than seclet.  Changed all uses and
	definitions.
	(bfd_coff_reloc16_estimate): Pass link_info arguments.  Changed
	all uses and definitions.
	* libcoff.h: Rebuilt.
	* ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
	not by ECOFF, make it scAbs.
	(ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
	rewritten.
	* elf32-mips.c (mips_elf_final_link): Renamed from
	mips_elf_seclet_link and rewritten.
	* elf32-hppa.c (elf32_hppa_stub_description): Added link_info
	field.
	(new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
	hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
	Added link_info arguments.  Changed all callers.
	* elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
	not NULL.
	* oasys.c (oasys_write_sections): Return boolean value rather than
	using bfd_error_vector.
	(oasys_write_object_contents): Check return value of
	oasys_write_sections.
	* hosts/std-host.h: Don't declare qsort or strtol.
	* Makefile.in: Rebuild dependencies.
	(BFD_LIBS): Removed seclet.o.  Added hash.o and linker.o.
	(CFILES): Removed seclet.c.  Added hash.c and linker.c.
	(HFILES): Removed seclet.h.  Added genlink.h.
1993-12-30 19:56:50 +00:00
David MacKenzie f8af9b40a2 cleanups and mach3 changes 1993-12-15 17:08:52 +00:00
Ian Lance Taylor ecb2d88791 * config/solaris2.mh (HDEFINES): Remove -Dconst=
* hosts/solaris.h: If not __GNUC__, define const as empty.
1993-12-03 23:42:59 +00:00
Ian Lance Taylor e92512bb28 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
to unsigned long.
1993-12-01 19:51:19 +00:00