Commit Graph

579 Commits

Author SHA1 Message Date
Jim Kingdon 3f06498af4 changes for SVR3.2 1993-04-19 18:34:55 +00:00
Jim Kingdon 7e4db2548b * libbfd.c: bfd_put*: Remove casts to bfd_vma. 1993-04-19 13:35:48 +00:00
Jim Kingdon 250351fc75 * aoutf1.h (internal_sunos_core): Make c_stacktop a bfd_vma.
(swapcore_sparc): Make sp a bfd_vma.
1993-04-17 01:44:18 +00:00
Jim Kingdon 14e3c2e47d * libbfd.c: Add signed versions of bfd_{h_,}{get,put}_signed_<size>.
libbfd.c, libbfd-in.h: Add _do*signed*.
	targets.c, all targets: Add bfd*signed*.
	bfd-in.h: Add bfd_signed_vma.  Add comments.
1993-04-17 00:39:36 +00:00
Jim Kingdon 34b6a8c305 Thu Apr 15 09:09:18 1993 Jim Kingdon (kingdon@cygnus.com)
* bfd-in.h (bfd_error), bfd.c (bfd_errmsgs): Add file_truncated.

	* format.c (bfd_check_error): Check error return from
	_bfd_check_format routines.

Wed Apr 14 23:48:25 1993  Jim Kingdon  (kingdon@cygnus.com)

	* rs6000-core.c (rs6000coff_core_p): Improve error checking and
	recognize .data section if present.
1993-04-15 19:29:51 +00:00
John Gilmore a99c3d7094 * aoutx.h (aout_*_adjust_sizes_and_vmas): Avoid `sanity'
check for the case where the user sets the address of the BSS
section (and the file header can't specify this).  Let the user
set it wherever they want, regardless of what goes in the header.

Fixes #ld/1826 (the fix was never checked in by Steve or Ken).
1993-04-15 08:44:58 +00:00
John Gilmore 7185848601 * ieee.c (ieee_slurp_sections): Pass all ieee section names
straight through into BFD sections.  Add comments.
1993-04-15 08:05:31 +00:00
John Gilmore b6090f4d65 Cleanup in preparation for better 64-bit host support.
* bfd-in.h (bfd_64_type):  Remove.
* libbfd.c (_do_getb64, _do_putb64):  Use bfd_vma, not bfd_64_type.

* bfd-in.h (bfd_size):  Remove.

* bfd-in.h (bfd_offset):  Remove, after fixing ld/ldlang.[ch].

* bfd-in.h (bfd_word):  Remove.
* reloc.c (reloc_howto_type):  Replace bfd_word with bfd_vma.

* bfd-in.h (rawdata_offset):  Remove.
* reloc.c (arelent):  Replace rawdata_offset with bfd_size_type.
(bfd_perform_relocation):  Lint.
(enum bfd_reloc_status):  Comment cleanup.
1993-04-15 04:53:14 +00:00
John Gilmore d0b09ced76 Clean up old comments 1993-04-12 21:18:31 +00:00
Ian Lance Taylor 36c0a1ec22 * config/sun3.h: String argument to fprintf is const. 1993-04-09 18:50:36 +00:00
Ian Lance Taylor 032250cda4 * coff-mips.c: Renamed PAGE_SIZE to ROUND_SIZE, to avoid confusion
on systems which define PAGE_SIZE in <limits.h>.
1993-04-09 17:48:10 +00:00
Peter Schauer 98a445b0fa * trad-core.c (trad_unix_core_file_failing_signal): Use new macro
TRAD_UNIX_CORE_FILE_FAILING_SIGNAL to allow host files to specify
        the core file failing signal.
        * hosts/decstation.h (TRAD_UNIX_CORE_FILE_FAILING_SIGNAL): Define
        to supply the core file failing signal.
1993-04-08 17:30:28 +00:00
Ian Lance Taylor a6235cbbc2 * coff-mips.c (PAGESIZE): Correct value.
With the wrong PAGESIZE everything worked just fine, with one
exception: emacs couldn't dump itself.
1993-04-07 18:34:25 +00:00
Ian Lance Taylor 46bc1bf6ba These changes make shared library support work again on 386 COFF
systems.

	* coffcode.h (styp_to_sec_flags): Set SEC_SHARED_LIBRARY for a
	STYP_NOLOAD | STYP_BSS section.  Don't set SEC_NEVER_LOAD for a
	STYP_INFO section.
	(coff_compute_section_file_positions): Force vma and lma of _LIB
	section to be zero.
	(coff_set_section_contents): Count number of entries in new lma
	field, not in vma.
	* coffgen.c (make_a_section_from_file): Force lineno_count of
	SEC_SHARED_LIBRARY section to be zero, since it is non-zero on the
	SCO 3.2v4 shared library.
	* seclet.c (rel): Copy over any section with contents, not just
	loadable sections.

	* coff-mips.c (ecoff_make_empty_symbol): Zero out newly allocated
	symbol.
1993-04-06 00:53:41 +00:00
Ian Lance Taylor 3cb4caa6b5 This makes ld -r work for i386-coff targets.
* coff-i386.c (coff_i386_reloc): New function, to generate
	relocateable output correctly.
	(howto_table): Use coff_i386_reloc for all reloc types.
	(CALC_ADDEND): Use a more efficient hack to get the correct addend
	for a common symbol.
	(i386comm_value): Removed; no longer needed.
1993-04-05 20:09:58 +00:00
Steve Chamberlain 77f31b05cc *** empty log message *** 1993-04-04 22:12:22 +00:00
Ian Lance Taylor b580c2b543 * seclet.c (seclet_dump_seclet): Correct SEC_HAS_CONTENTS test. 1993-04-02 22:36:04 +00:00
Steve Chamberlain 21c7770362 * aoutx.h (translate_from_native_sym_flags): Now handles indirect
symbols in a better way. (translate_to_native_sym_flag): Set the
	N_INDR bit when necessary. (aout<>slurp_symbol_table): Maintain
	indirect state.
	* section.c: Added BFD_IND_SECTION_NAME and bfd_ind_section.
	(bfd_make_section): Cope with new builtin section.
	* syms.c (bfd_decode_symclass): Can now print indirect section
	info.
1993-03-30 17:40:51 +00:00
David D. Zuhn f2681266a7 update dvi & info targets 1993-03-24 10:34:02 +00:00
Ken Raeburn 828e987e6b mipsbsd renaming, libbfd optimization fixes 1993-03-24 08:18:16 +00:00
Ken Raeburn 6c0eb6c8c9 FILE_OFFSET_IS_CHAR_INDEX changes to libbfd.c and hosts/sparc.h 1993-03-23 14:23:48 +00:00
David D. Zuhn 76019c92cd add installcheck target 1993-03-23 07:19:06 +00:00
Ian Lance Taylor 182b4c978d * coff-mips.c (ecoff_set_symbol_info): Relocate encapsulated stabs
if the type is not stNil.
1993-03-22 22:59:29 +00:00
Ken Raeburn b47ca13f2a elf32.c, elf32-sparc.c changes 1993-03-16 18:37:51 +00:00
David D. Zuhn 663a55364b consistent use of -solaris2* 1993-03-13 02:59:38 +00:00
Jim Kingdon 2e0e34505d * rs6000-core.c: Add .ldinfo section. 1993-03-12 23:05:12 +00:00
Ian Lance Taylor 204ae00cc1 * Makefile.in (MAKEOVERRIDES): Define to be empty. 1993-03-12 19:58:54 +00:00
Steve Chamberlain ad7009aa91 * section.c (bfd_set_section_contents): whitespacs
* seclet.c (seclet_dump_seclet): Don't try and fill sections with
	no contents.
1993-03-12 16:33:59 +00:00
David D. Zuhn b3df94565a don't define POSIX_UTIME for go32, makes ar & ranlib happy again 1993-03-12 03:32:47 +00:00
Fred Fish 286a4427e5 * elf32.c (elf_object_p): Use ELF_ARCH stored in xvec to match
against machine architecture stored in the ELF header, to resolve
	ambiguities.
	* elf32.c (bfd_section_from_shdr):  Bfd_make_section can return
	NULL, so only use results when non-NULL.
	* targets.c (elf32_m68k_vec, elf32_i860_vec):  Add extern decls
	and add to vector of targets.
1993-03-09 18:59:58 +00:00
Ken Raeburn 0093d9e67f hppa.c: don't require DL_MAGIC, SHL_MAGIC, if they're not defined (hpux 7.0) 1993-03-08 21:30:29 +00:00
Ken Raeburn 59415c56b3 hppa and aix386-core changes 1993-03-08 20:58:34 +00:00
Ian Lance Taylor f68d8549cc * coff-mips.c (ecoff_bfd_reloc_type_lookup): New function.
(ecoff_write_object_contents): Added BFD_ASSERT calls to ensure
	relocs are reasonable.
	* coff-msym.c: Eliminated uses of DEFUN.
	(ecoff_swap_tir_out): New function.
1993-03-04 22:48:46 +00:00
Fred Fish b84d84d7a6 (Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
* configure.host (vax-*-ultrix2*):  Add triplet.
	* hosts/vaxult2.h:  New file.
	* config/vaxult2.mh:  New file.
1993-03-03 05:56:52 +00:00
Fred Fish 312bef9d21 * aoutx.h (string.h): Include for strchr and friends.
* archive.c (string.h):  Include for memchr and friends.
	* elf32.c (string.h):  Include for strrchr and friends.
1993-03-03 01:54:42 +00:00
Ken Raeburn 14c5897713 Document damage^H^H^H^H^H^Hwork done so far tonight.
Mostly playing with elves.
1993-02-27 07:34:47 +00:00
Steve Chamberlain 2ebd09764b symbol srec stuff 1993-02-27 01:43:10 +00:00
Ken Raeburn 539a840f7b * elf.c (elf_write_object_contents): Section ".shstrtab" should be
type SHT_STRTAB.  Don't alter file offset for section 0.
	(reloc_type_names): Now an array instead of a macro.  Still inside
	"#if 0", since it's used only in debugging code also in "#if 0".
	(struct elf_reloc_map_elt, struct elf_reloc_map): New types.
	(sort_reloc_map): New function.
	(sparc_reloc_map): New variable.
	(elf_bfd_reloc_type_lookup): New function.

Now bfd-gas can create valid empty object files for sun4sol2.
1993-02-25 14:28:02 +00:00
Ian Lance Taylor c0f6093b0c * Minor cleanups provoked by gcc warnings:
* aoutx.h (NAME(aout, reloc_type_lookup)),
	cpu-h8300.c (local_bfd_reloc_type_lookup),
	cpu-z8k.c (local_bfd_reloc_type_lookup): Added default case to
	switches.
	* archive.c (do_slurp_bsd_armap, do_slurp_coff_armap),
	ieee.c (ieee_slurp_section_data),
	elf.c (elf_make_sections, elf_fake_sections,
	elf_compute_section_file_positions, elf_write_object_contents):
	Removed unused variables.
	* archures.c: Removed /* from within comment.
	* bout.c (b_out_squirt_out_relocs): Initialize r_extern.
	* oasys.c (oasys_write_data): Initialize i.
1993-02-23 21:08:32 +00:00
Ian Lance Taylor 8feff71726 * bfd-in.h (JUMP_TABLE): Added bfd_reloc_type_lookup and
bfd_make_debug_symbol; they were already in the target structure.
	* Adjusted all uses of JUMP_TABLE.
	* coffgen.c, libcoff-in.h (coff_bfd_make_debug_symbol): Renamed
	from coff_make_debug_symbol.
	* libcoff.h: Updated accordingly.
1993-02-23 20:24:06 +00:00
Per Bothner 85fe7cfff3 * libcoff.h (obj_raw_syment_coun): New macro.
* coffgen.c (coff_get_normalized_symtab):  Initialize
	raw_syment_count.
	* coffgen.c (coff_find_nearest_line):  Numerous little fixes.
1993-02-23 06:50:49 +00:00
Ian Lance Taylor 20f10b59ff * coff-mips.c (ecoff_set_symbol_info): stBlock symbols are always
debugging symbols.
	(ecoff_get_debug): Offset the fdr adr by the adr of the first pdr,
	for compatibility with tools from MIPS.

	* config/bigmips.mt: New file; default vector is ecoff_big_vec.
	* config/irix3.mt, config/irix4.mt: Removed.
	* configure.in (mips-*-ecoff): New target; uses bigmips.mt.
	(mips-sgi-*, mips-big-*): Use bigmips rather than irix3.
1993-02-22 23:17:45 +00:00
K. Richard Pixley 2338f9c4dd * trad-core.c (trad_unix_make_empty_symbol): wrap PARAMS around an
ansi definition which otherwise confuses non-ansi compilers.
1993-02-17 21:02:01 +00:00
K. Richard Pixley ec69652fc5 aout-adobe.c (aout_adobe_object_p): eliminate a warning from vax
ultrix cc by forward declaring getenv as is done in bfd_find_target.
1993-02-17 20:30:19 +00:00
K. Richard Pixley b40a3bf26f cast an enum into unsigned char avoiding a fatal error in vax ultrix 4.2 cc. 1993-02-17 01:58:47 +00:00
John Gilmore ec30dfba17 Roll to version 2.1. 1993-02-16 08:49:29 +00:00
John Gilmore 3039e8eeaf * oasys.c (oasys_write_object_contents): Lint.
* srec.c:  Whitespace cleanup.
1993-02-16 04:44:28 +00:00
Ian Lance Taylor e61cfdf820 Fri Feb 12 14:23:07 1993 Ian Lance Taylor (ian@cygnus.com)
* coffgen.c (coff_print_symbol): Print correct tagndx value;
	cleaned up output formatting a bit.
1993-02-12 22:24:47 +00:00
Steve Chamberlain 142ce43edd * coffcode.h (coff_set_arch_mach_hook): *FIXME* the H8/300 is always
relaxable.  Should be moved somewhere else.
1993-02-12 16:32:32 +00:00
Steve Chamberlain ff975a2c4c H8/500 support 1993-02-04 20:59:55 +00:00
Ian Lance Taylor a3b3dbdda5 Thu Feb 4 12:35:02 1993 Ian Lance Taylor (ian@cygnus.com)
* libecoff.h: New file.  Defines ECOFF backend data for gdb.
	* coff-mips.c: Now includes libecoff.h.
	(ecoff_data_type): Moved to libecoff.h.
	(ecoff_slurp_symbolic_info): Made globally visible so that gdb can
	call it.  If there is ever another ECOFF target, this and the
	swapping functions should be accessed via an ECOFF specific target
	vector.
	Makefile.in (coff-mips.o): Depends on libecoff.h.
1993-02-04 20:47:10 +00:00
Ian Lance Taylor 1a8c6d5b92 Wed Feb 3 09:14:36 1993 Ian Lance Taylor (ian@cygnus.com)
* coffcode.h: Removed MIPS specific information, since coff-mips.c
	no longer includes this file.
1993-02-03 20:08:22 +00:00
Ian Lance Taylor 63fd1097f5 Wed Feb 3 09:14:36 1993 Ian Lance Taylor (ian@cygnus.com)
* coff-msym.c (ecoff_swap_fdr_in, ecoff_swap_ext_in): Set reserved
	bits to 0 to make comparison test useful.

	* config/irix3.mh, config/irix4.mh (HDEFINES): Set to -G 4 to
	avoid overflowing GP accessible sections in binutils/objdump.
1993-02-03 17:17:34 +00:00
Per Bothner 96f03b0f0d * aoutx.h (NAME(aout,slurp_symbol_table)): Made symbol
reading more robust:  Fail if string index is out of string
	table range.
1993-02-02 23:38:38 +00:00
Ian Lance Taylor 5e462ed938 Create a .scommon section for each input BFD so the linker has
something to attach small common symbols to.  Then avoid writing out
the (empty) .scommon section for the output BFD.

Tue Feb  2 11:41:06 1993  Ian Lance Taylor  (ian@cygnus.com)

	* coff-mips.c: Completed support for linker and binutils.
1993-02-02 19:43:44 +00:00
John Gilmore 9d9fa9dca8 Fix typo in file name. 1993-01-29 06:32:36 +00:00
John Gilmore 536c2ad4be Fix minor bugs reported by Carl Greco, <cgreco@parrot.creighton.edu>:
* hosts/delta88.h (strtol):  Fix prototype.
* config/m88k-coff.mh (SELECT_ARCHITECTURES):  Fix name.
1993-01-29 05:04:45 +00:00
Ian Lance Taylor 382f2a3d75 Tue Jan 26 11:43:14 1993 Ian Lance Taylor (ian@cygnus.com)
* section.c (SEC_IS_COMMON): New section flag, needed for MIPS
	ECOFF which has two common sections.
	(bfd_com_section): Set SEC_IS_COMMON flag.
	* bfd-in.h (bfd_is_com_section): New macro to test SEC_IS_COMMON.
	* aoutx.h, archive.c, bout.c, coff-a29k.c, coff-m88k.c,
	coff-mips.c, coffgen.c, ieee.c, oasys.c, reloc.c, syms.: Use
	bfd_is_com_section macro rather than checking for equality to
	bfd_com_section.
1993-01-26 19:54:07 +00:00
Ian Lance Taylor fa8fea3dda * coffswap.h (coff_swap_aouthdr_in, coff_swap_aouthdr_in): Swap
additional MIPS ECOFF fields.
1993-01-25 23:31:51 +00:00
Ian Lance Taylor dcf5ddb89b Revert yesterday's change (adding casts) at gnu's request. 1993-01-20 15:35:50 +00:00
Ian Lance Taylor fa2b89f103 Tue Jan 19 09:06:14 1993 Ian Lance Taylor (ian@cygnus.com)
* aoutx.h (swap_ext_reloc_in, swap_std_reloc_in),
	bout.c (b_out_slurp_reloc_table),
	coff-mips.c (ecoff_swap_reloc_in),
	coff-msym.c (ecoff_swap_sym_in, ecoff_swap_rndx_in,
	ecoff_swap_opt_in): Added casts to int to avoid muttering by
	MIPS compiler.
1993-01-19 18:23:21 +00:00
Ian Lance Taylor 8b8a071eb2 Tue Jan 19 09:06:14 1993 Ian Lance Taylor (ian@cygnus.com)
* bfd-in.h (bfd_asymbol_value): Add needed parentheses.
1993-01-19 17:28:28 +00:00
Ian Lance Taylor f3146b66c1 Tue Jan 19 09:06:14 1993 Ian Lance Taylor (ian@cygnus.com)
* libcoff-in.h: Update prototype for coff_count_linenumbers.
1993-01-19 17:07:35 +00:00
Ian Lance Taylor 8fa0d3a012 Basically a checkpoint for coff-mips.c.
Fri Jan 15 18:13:17 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)

	* coff-msym.c (ecoff_swap_hdr_out, ecoff_swap_fdr_out,
	ecoff_swap_pdr_out, ecoff_swap_sym_out, ecoff_swap_ext_out,
	ecoff_swap_rndx_out, ecoff_swap_rfd_out, ecoff_swap_opt_in,
	ecoff_swap_opt_out, ecoff_swap_dnr_in, ecoff_swap_dnr_out): New
	functions.
	* coffswap.h: If NO_COFF_RELOCS is defined, don't define
	bfd_swap_reloc_in or coff_swap_reloc_out.
	* coff-mips.c: Added code to link and write out symbolic debugging
	information, and to swap relocs in and out.
1993-01-15 23:39:05 +00:00
Steve Chamberlain 30ea4a2d91 * libcoff.h, coffgen.c (coff_count_linenumbers), coffcode.h
(coff_write_object_contents): coff_count_linenumbers returns the
	number of line number records it found.

	* coffgen.c (coff_write_linenumbers): only write out line numbers
	in the section they belong to.
1993-01-14 23:56:04 +00:00
Ian Lance Taylor 0c2fae099a Mon Jan 11 18:32:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* targets.c (bfd_target): Added relocateable argument to
	_bfd_get_relocated_section_contents.  Added _bfd_seclet_link
	target vector for linker use.
	* bfd.c (bfd_seclet_link): New macro.
	* bfd-in.h (JUMP_TABLE): Added _bfd_seclet_link.
	* seclet.c (rel, seclet_dump_seclet): Added relocateable argument
	and boolean return value.  Made static.
	(bfd_generic_seclet_link): Renamed from seclet_dump.  Added
	relocateable argument.
	* reloc.c (bfd_generic_get_relocated_section_contents): Added
	relocateable argument (if relocateable, saves relocs).
	* bout.c (b_out_get_relocated_section_contents),
	reloc16.c (bfd_coff_reloc16_get_relocated_section_contents): Added
	relocateable argument (if relocateable, just calls
	bfd_generic_get_relocated_section_contents).
	* libcoff-in.h (bfd_coff_reloc16_get_value): Added relocateable
	argument to prototype.
	* All targets: Set new _bfd_seclet_link vector to
	bfd_generic_seclet_link.
1993-01-12 00:38:59 +00:00
Stu Grossman a8ba7cc6b1 * coffgen.c: #include seclet.h. 1993-01-10 05:30:36 +00:00
Stu Grossman d0a650a475 * hppa.c (hppa_object_setup): Get rid of all knowledge of stabs
debug info.  Setup info about linker symbols only, and use
	standard bfd fields to hold the info.
	* (hppa_object_p):  Remove unneeded decls.
	* (hppa_new_section_hook):  Get rid of most of this.
	* libhppa.h (struct hppadata):  Remove ten pounds of useless ugly
	fat.  Remove all knowledge of stabs, remove redundant knowledge of
	linker symbols.
	* Remove macros for accessing fields which are now gone.
1993-01-10 03:57:45 +00:00
Steve Chamberlain 47cf499721 * coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on
STYP_NOLOAD bit.
	* coff-z8k.c: delete unused reloc functions
1993-01-08 23:21:26 +00:00
Ian Lance Taylor 515c429211 Basically a checkpoint.
Fri Jan  8 15:47:53 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)

	* bfd.c (struct _bfd): Added ecoff_tdata to tdata union.
	* targets.c (enum target_flavour): Added bfd_target_ecoff_flavour.
	* coff-msym.c: Use DEFUN for function definitons.
	* coff-mips.c: Added code to read and print symbols, and to find
	line numbers.
1993-01-08 21:46:36 +00:00
Ian Lance Taylor 6082cdd566 Forgot to commit ChangeLog. 1993-01-08 21:26:42 +00:00
David D. Zuhn 240f485a41 use bfd_xmalloc instead of malloc 1993-01-06 08:24:08 +00:00
Ken Raeburn 7a938fa53d Temporary hack until Per's solution gets implemented: If --with-minimal-bfd is
specified, set MINIMIZE=1.  (Not the default.)
1993-01-05 14:57:44 +00:00
Steve Chamberlain 27de82c603 * srec.c (srec_write_records): one of my boards wants a CR between
records.
1993-01-04 15:21:21 +00:00
Ian Lance Taylor 7b4eaa0ee6 Wed Dec 30 12:46:30 1992 Ian Lance Taylor (ian@cygnus.com)
* archive.c (do_slurp_coff_armap): set symdef_count correctly
	(it broke a couple of weeks ago).
1992-12-30 20:49:21 +00:00
Ken Raeburn c3efeb9248 fix libbfd.h declaration, by tweaking elf.c comment, so bfd can compile 1992-12-30 02:48:29 +00:00
Ian Lance Taylor cc29d6659b Tue Dec 29 13:54:35 1992 Ian Lance Taylor (ian@cygnus.com)
* coffcode.h (coff_real_object_p): use name I386AIXMAGIC rather
	than I386SVMAGIC.
	(coff_pointerize_aux): don't pointerize a negative tagndx
	(sometimes generated by SCO 3.2v4 cc).

	* bout.c (calljx_callback, callj_callback,
	b_out_get_relocated_section_contents): warn if relocating against
	an undefined symbol.
1992-12-29 21:59:15 +00:00
Stu Grossman edff05870e * hppa.c: Get rid of DEFUN, use more conventional prolog stuff.
Make a bunch more routines be static.
* hppa.c (fill_spaces):  Get rid of this, replace with much better
written setup_sections().
* (setup_sections):  New routine to create BFD sections for each
space and subspace in SOM files.
* (hppa_object_setup):  Use BFD sections created by
setup_sections() to locate GDB symbol table info.
* (make_unique_section):  New routine to create a BFD section.  It
ensures that the given name is unique, and will generate a unique
one if necessary.
* (hppa_object_p):  Become much more paranoid about file header.
* (make_bfd_asection):  Call bfd_make_section to do the dirty
work.  Simplify code somewhat.
* (hppa_core_file_p):  Use proper name for stack section.
* libhppa.h:  Remove millicode_start, millicode_end decls.
1992-12-28 22:57:19 +00:00
Ken Raeburn 5145ac4f24 today's changes 1992-12-28 19:11:56 +00:00
Fred Fish e555d76415 * bfd.c (bfd_get_size): New function that gets an upper bound
on the possible size of any object in a bfd.
	* elf.c (bfd_elf_find_section, elf_get_str_section,
	elf_get_symtab_upper_bound):  Rewrite to avoid NULL pointer
	dereferences.
	* elf.c (elf_big_vec, elf_little_vec):  Document last three
	members initialized to NULL.
1992-12-28 01:51:57 +00:00
David D. Zuhn 75dd6a3e4b * hppa.c: change a 'const' to 'CONST', or else HP C compiler dies 1992-12-25 01:50:27 +00:00
David D. Zuhn 74991624b2 added dvi target 1992-12-24 22:44:50 +00:00
Per Bothner 0e238aa74b * bfd-in.h: New macros bfd_asymbol_bfd and bfd_asymbol_flavour;
perhaps we can later remove the the_bfd field from each symbol.
	* syms.c (struct symbol_cache_entry):  Remove unused field
	app_data.  Add comment noting that the_bfd is almost redundant,
	but not quite.
	* aoutx.h, coff-a29k.c, coff-i386.c, coff-i960.c, coffcode.h:
	Use new macros bfd_asymbol_bfd and bfd_asymbol_flavour.
	* hppa.c (fill_spaces):  Make slightly more rebust.
	* configure.in:  Allow std-host as the "default" host.
1992-12-22 23:40:27 +00:00
Stu Grossman d70d5a2601 * bfd.c: Add struct hppa_core_data to tdata union. 1992-12-22 05:28:27 +00:00
Stu Grossman 205d660d59 * hppa.c: Conditionalize on HOST_HPPAHPUX instead of hp9000s800.
Get rid of HPPA/BSD specific code.  That will go somewhere else
someday.
* (fill_spaces):  Don't spin forever and die if you don't find
$MILLICODE$ subspace.
* (hppa_object_p):  Make sure that we have a real honest-to-cthulu
exec file!
* (hppa_core_file_failing_signal, hppa_core_file_failing_command):
Make these work for HPUX.
* (make_bfd_asection):  New routine to make section creation a
little easier.
* (hppa_core_file_p):  Completely rewrite, leave out bugs.
* libhppa.h:  #include the right system files.  Redefine all of
the structs/macros for hacking core files to use more sensible
HPUX core file structures.
* targets.c (target_vector):  Conditionalize hppa_vec on
HOST_HPPAHPUX, not hp9000s800.
* hosts/hppahpux.h:  #include stdlib.h to get correct decls for
malloc and realloc.  #define HOST_HPPAHPUX.
1992-12-22 01:53:06 +00:00
Ian Lance Taylor 60ac749cab Mon Dec 21 12:40:10 1992 Ian Lance Taylor (ian@cygnus.com)
* Patches from Minh Tran-le <mtranle@paris.intellicorp.com>.
	* configure.in (i386-*-isc*, i386-*-aix*): New targets.
	* configure.host (i386-*-isc*, i386-*-aix*): New hosts.
	* hosts/i386isc.h, config/i386isc.mh: New files for Interactive
	Unix.
	* hosts/i386aix.h, config/i386aix.mh: New files for AIX on PS/2.
	* aix386-core.c: New file for handling core files on AIX on PS/2.
	* targets.c: if AIX386_CORE, use aix386_core_vec.
	* coffcode.h (coff_real_object_p): check for I386SVMAGIC as well
	as I386MAGIC.
1992-12-21 21:17:54 +00:00
Steve Chamberlain 6c1cabd48f * aoutf1.h (sunos4_write_object_contents): set flags to 0, fixing
1927.
1992-12-18 18:38:04 +00:00
John Gilmore d3e667e88d * bfd.c: Use right name for tekhex tdata struct.
* tekhex.c:  Insert leading_char (0) into bfd_target struct.  Style.
* libcoff.h:  Updated to get spacing change from coffcode.h.
* trad-core.c:  leading_char is 0 (no symbols!), not '_'.
1992-12-17 08:42:31 +00:00
Per Bothner 287c221dd2 Various changes to improve archive support. See ChangeLog. 1992-12-16 00:01:59 +00:00
Stu Grossman 76c7e44dde * hppa.c: #include "sysdep.h", not <sysdep.h>.
* libhppa.h:  Make millicode_start and millicode_end be unsigned
int to be same type as CORE_ADDR in GDB.  Why are these here?
1992-12-15 01:12:34 +00:00
Ken Raeburn 07de8e96b3 syms.c (asymbol): Added new field "app_data", for data particular to the
application.  Some of the linker flags ought to get moved to this field
someday.

archures.c (bfd_default_scan): Recognize a few more numbers: 80486, 80960,
and 960.

bfd-in.h, bfd.c, targets.c, coffcode.h, coff-mips.c, other targets: Moved COFF
swap table to backend data.

hosts/i386linux.h: Include unistd.h.
aoutx.h, libaout.h, stab-syms.c: stab names are now in constant storage.
trad-core.c: Fixed some `PARAMS' uses that were missing parentheses.
aoutx.h, archive.c, archures.c, coffcode.h, ctor.c, reloc.c, syms.c: Doc fixes.
1992-12-03 23:03:17 +00:00
Fred Fish b86f998b8a * aoutx.h (some_aout_object_p): Protect arg prototype in
callback_to_real_object_p with PARAMS macro for non-ANSI compilers.
1992-11-29 16:40:09 +00:00
John Gilmore 1f29e30b1f * aout-target.h, aoutf1.h, trad-core.c, coffcode.h, libaout.h:
Eliminate all PROTO calls, replace with PARAMS for readability.

* aoutx.h:  Add type to callback parameter.
* coff-mips.c:  Don't call trad-core.h, not needed.
* trad-core.c:  Incorporate trad-core.h declarations.  Fix comments.
* trad-core.h:  Eliminate, unused.
1992-11-28 13:00:18 +00:00
John Gilmore 1093ee14ae * libbfd-in.h, bfd-in.h: Eliminate all PROTO calls, replace with
PARAMS for readability.
1992-11-28 12:14:14 +00:00
David D. Zuhn 2385eb2f1f pass down prefix and exec_prefix 1992-11-13 01:03:52 +00:00
Steve Chamberlain 1a9904b4cb * coff-z8k.c: checkpoint, more addressing modes handled
* coffcode.h (get_value): don't truncate reloc->addend field, it's
	a long now.
1992-11-12 17:53:58 +00:00
Brendan Kehoe 91ec84ef69 * we32k.mt (TDEFAULTS): Use we32kcoff_vec, not i386coff_vec. 1992-11-12 07:59:59 +00:00
David D. Zuhn 6cabab7823 make cc command lines more consistent 1992-11-10 22:07:02 +00:00
John Gilmore 9ee6289b47 * opncls.c (bfd_fdopenr, bfd_close): Add doc about cacheing
and about when file descriptors are closed.
1992-11-10 07:59:39 +00:00
Ian Lance Taylor 8f718ed3bd Thu Nov 5 15:34:19 1992 Ian Lance Taylor (ian@cygnus.com)
* section.c: New section bit SEC_SHARED_LIBRARY.
	coffcode.h (styp_to_sec_flags): if STYP_NOLOAD && (STYP_TEXT ||
	STYP_DATA), set SEC_SHARED_LIBRARY.  This seems to be correct for
	i386-sysv.
1992-11-06 00:38:59 +00:00
John Gilmore 3662554d78 * target.c (struct bfd_target): Eliminate the SDEF and SDEF_FMT
macros; use PARAMS to declare the function pointers involved.
1992-11-05 13:50:25 +00:00
John Gilmore 990e7c2297 * bfd-in.h, bfd.c, libbfd.h, reloc.c, seclet.h, section.c,
targets.c: Rename struct bfd_seclet_struct to struct bfd_seclet.
1992-11-05 13:17:38 +00:00
John Gilmore fefb4b30e6 Cleanup: Replace all uses of EXFUN in the BFD sources, with PARAMS.
* archures.c, reloc.c, section.c, tekhex.c:  Use PARAMS in
declaring pointers to functions.
* cache.c, elf.c:  Move static function decls to top, use PARAMS.
* seclet.h:  Declare external function with PARAMS.

* libbfd.h:  Update, based on changes in source code and chew.
1992-11-05 11:13:01 +00:00
John Gilmore 00539ee3b3 * bfd-in.h: Improve comments to make it clear that bfd.h is
the wrong place to edit this file.
* Makefile.in (install):  Install ansidecl.h and obstack.h in the
same places where we install bfd.h.
* libieee.h:  Add FIXME about removing limit on number of sections.
1992-11-05 08:17:56 +00:00
Sean Eric Fagan 061a65a56f (Duplicate change from p3.)
Only change coff auxent header fields when the circumstances require it.  or
at least warrant.
1992-11-04 21:57:47 +00:00
Ken Raeburn 9159aa3097 aoutx.h (some_aout_object_p): Section list should be set up properly already;
don't need to tweak "next" pointers.
1992-11-04 14:35:20 +00:00
Ian Lance Taylor 3fd7451e39 I'm eliminating the use of USG from binutils/ar.c, and nothing else in
binutils, bfd or opcodes uses it.

Mon Nov  2 12:36:14 1992  Ian Lance Taylor  (ian@cygnus.com)

	* config/delta88.mh, config/hp300.mh, config/hppahpux.mh,
	config/i386v.mh: removed -DUSG from HDEFINES.
	hosts/delta88.h, hosts/hp300.h, hosts/hppahpux.h, hosts/i386v.h:
	defined USE_UTIME.
	hosts/i386v.h: don't define POSIX_UTIME.
1992-11-02 20:41:14 +00:00
Steve Chamberlain b533ed9479 * ieee.c (ieee_slurp_sections): make a private copy of the
section's name before truncating it.
1992-10-31 00:15:10 +00:00
Steve Chamberlain 4e98653cf6 * hppa.c: add symbol_leading_char entry in transfer vec 1992-10-29 16:32:36 +00:00
Steve Chamberlain aff6e0b45a ,Wed Oct 28 16:11:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* ieee.c (get_symbol): can now cope when two symbols of a
	different class, but the same index number occur consecutively.
	(get_section_entry): nicer name for sections being forward
	referenced. (ieee_archive_p): don't free the filename string,
	since it was never malloced.
1992-10-29 00:17:07 +00:00
John Gilmore 17f9c81775 (coff_write_object_contents): Zero timestamp field. 1992-10-28 21:44:39 +00:00
Ian Lance Taylor 98fd98bcb4 Moved in from p3:
Tue Oct 27 12:24:34 1992  Ian Lance Taylor  (ian@cygnus.com)

	* coffcode.h (coff_swap_aux_out): set the fcnary info before
	optionally setting the dimen info, since they are in the same
	memory locations.  Also zero out external auxent.
	(coff_write_symbol): don't zero external auxent; now done in
	coff_swap_aux_out.
1992-10-27 20:34:40 +00:00
Ian Lance Taylor 700b2ee3ef Fri Oct 23 13:55:35 1992 Ian Lance Taylor (ian@cygnus.com)
* Check fclose return value for errors.
	libbfd.h: bfd_cache_close now returns a boolean.
	cache.c (bfd_cache_delete): return fclose success value.
	(bfd_cache_close): return bfd_cache_delete return value.
	opncls.c (bfd_close, bfd_close_all_done): return result of
	bfd_cache_close.
1992-10-23 21:01:29 +00:00
Steve Chamberlain c26d7d179c Fri Oct 23 10:32:36 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* seclet.c (rel): don't load sections without the SEC_LOAD bit.

Thu Oct 15 10:16:35 1992  Steve Chamberlain  (sac@thepub.cygnus.com)

	* coff-m68k.c (m68k_howto2type, SELECT_RELOC): new function to
	work out a coff relocation type from a howto's attributes rather
	than using the input r_type field. This fixes PR1677 and allows
	conversion of a.out relocs to coff relocs.

	* coffcode.h (coff_write_relocs): if supplied a relocation
	relative to an absolute symbol, use the right symbol index.

	* reloc.c (bfd_perform_relocation): do a partial link for coff
	relocs right.
1992-10-23 17:34:37 +00:00
Ian Lance Taylor b26059aa44 Fri Oct 23 08:15:56 1992 Ian Lance Taylor (ian@cygnus.com)
* changes to support i386-sysv with shared libraries:
	* coffcode.h (sec_to_styp_flags): if TWO_DATA_SECS is defined,
	check for .data2; if _LIB is defined, check for it; map
	SEC_NEVER_LOAD to STYP_NOLOAD.
	(styp_to_sec_flags): map STYP_NOLOAD to SEC_NEVER_LOAD.
	(make_a_section_from_file): if TWO_DATA_SECS, accept .data2.
	(coff_write_object_contents): force vaddr of .lib to 0; set scnptr
	if section has contents, not just if it is loadable; if
	TWO_DATA_SECS, check for .data2
	(coff_set_section_contents): set vma of .lib section to number of
	.lib sections.
	* coff-i386.c: define TWO_DATA_SECS; use a special CALC_ADDEND;
	don't define coff_write_armap to bsd_write_armap.
	* hosts/i386v.h: don't include <utime.h>, since it is not provided
	by SVR3.2.
1992-10-23 15:28:15 +00:00
John Gilmore 7b107b1ec4 * config/a29k-aout.mt (DEFAULT_TARGET): Set to one that exists. 1992-10-21 10:47:13 +00:00
Per Bothner 58c319d00b Document changes to hosts directory. 1992-10-15 22:16:07 +00:00
John Gilmore 6803d8186f Now update it in the *right* place... 1992-10-15 11:39:56 +00:00
John Gilmore 4a8db3300d Insert copyright notices in all BFD files that need them.
Update copyrights on recently changed files to 1992.
Regularize first-line comments somewhat.
1992-10-15 10:59:13 +00:00
John Gilmore b1b819bdc7 * bfd-in.h (file_ptr): Update comments, make FIXME re off_t. 1992-10-15 10:34:13 +00:00
John Gilmore 5f9ca96038 * aout-adobe.c, aoutf1.h, aoutx.h, bout.c coff-m68k.c, coff-z8k.c,
coffcode.h, elf.c, libaout.h, libbfd.h, srec.c:  Lint.
1992-10-15 09:44:59 +00:00
John Gilmore f8e0194018 * aout-adobe.c, aoutf1.h, archive.c, bout.c, coff-rs6000.c,
coffcode.h, elf.c, ieee.c, libaout.h, libbfd.c, oasys.c,
sco-core.c:  Lint:  Second argument of bfd_seek is always file_ptr.
Third argument is SEEK_SET or SEEK_CUR.  Result is always 0 or -1.
1992-10-15 09:00:09 +00:00
John Gilmore 5a5fa3688c * configure.host: New file, contains mapping of host configs
to host support file names for bfd, binutils, opcodes.
* configure.in:  Use it.
* i386aout.c:  Cleanup, dump TARGET_IS_LITTLE_ENDIAN_P.
* i386bsd.c:  Cleanup, reformat.
* config/i386-bsd.mt:  Comment changes.
* config/i386bsd.mh:  New file for core file support.
* hosts/i386bsd.h:  Merge changes from Peter Schauer.
* bout.c (ALIGN):  Rename to ALIGNER, since system header files
on BSD 4.4 define ALIGN (sigh!).
1992-10-09 11:38:30 +00:00
John Gilmore 366dfd0c6f * bout.c (ALIGN): Rename to ALIGNER, since system header files
on BSD 4.4 define ALIGN (sigh!).
1992-10-09 10:47:32 +00:00
John Gilmore 439a4936c3 * configure.in: Reformat the target section, test many configs. 1992-10-09 02:42:29 +00:00
Mark Eichin 7f90aa8b18 Linker now works for go32; other changes keep it from breaking the other
platforms (new backend_data "exec_header_not_counted") (from p3.)
1992-10-09 02:41:30 +00:00
Ken Raeburn 214f8f2392 * aout-target.h (callback): Don't define this function if it won't be used.
* aoutx.h (some_aout_object_p): Restore old aout_data value if this type
doesn't match.  Don't lose if file sections have already been created.
(set_arch_mach): Set reloc_entry_size.
(slurp_symbol_table): Use bfd_h_get_{16,8} for reaeding symbol data.

* hosts/i386bsd.h: New file.
* configure.in: Recognize i[34]86-*-bsd host.

* aout-target.h (callback, write_object_contents): Delete unused variables.

* aoutx.h (reloc_type_lookup): New function.
* aout-target.h (MY_reloc_howto_type_lookup): Use it as default.
* aoutf1.h (sunos4_reloc_type_lookup): Deleted.
(MY_reloc_howto_type_lookup): Don't define it.

* aoutx.h (adjust_sizes_and_vmas): Don't bother with padding for OMAGIC files.
(slurp_symbol_table): Use header byte order, not target byte order, for reading
symbol data.
1992-10-09 01:39:06 +00:00
John Gilmore d047d16af7 * configure.in: Undo some brain damage in the host section.
* Makefile.in (make):  Remove obsolete `make make'.
	* aoutx.h (some_aout_object_p):  Make defines line up.
1992-10-09 01:34:32 +00:00
Steve Chamberlain 294eaca479 Some of these are guesses, if you know different, just yell.
Thu Oct  8 08:52:48 1992  Steve Chamberlain  (sac@thepub.cygnus.com)

	 Now a bfd knows whether underscores are normally prepended
	 to symbols in its file format. Helps with error messages.

	* aout-adobe.c, aout-target.h, bout.c, coff-a29k.c, coff-h8300.c,
	coff-z8k.c: targets set so they have leading underscore
	* coff-i386.c, coff-i960.c, coff-m68k.c, coff-mips.c, coff-m88k.c,
	coff-rs6000.c, coff-we32k.c, elf.c, ieee.c, srec.c: targets set
	without leading underscore flag
	* targets.c: add symbol leading char to xvec description
	* bfd-in.h (bfd_get_symbol_leading_char): new macro.
1992-10-08 16:02:09 +00:00
Per Bothner 446c5af7c2 Tweak previous change (only assume malformed_archive if errno == 0). 1992-10-05 22:03:13 +00:00
Per Bothner 286fd2f9e5 * archive.c (_bfd_write_archive_contents): If read fails,
set bfd_error to malformed_archive (since this probably
	indicates a truncated archive), rather than system_call_error.
(Handles PRMS 1624.)
1992-10-05 21:36:56 +00:00
Mark Eichin fbee357154 added i386-*-bsd, from p3 1992-10-05 08:20:22 +00:00
David D. Zuhn 2652a49c49 avoid compiler warnings 1992-10-02 00:52:49 +00:00
Ken Raeburn 4e55c0f2d3 bout.c: Removed some unused variables 1992-09-29 20:30:25 +00:00
Ken Raeburn 8d909e996e coffcode.h (coff_section_symbol): Create section if it doesn't exist. 1992-09-29 20:26:01 +00:00
Ian Lance Taylor acc7c4933d Tue Sep 29 08:30:21 1992 Ian Lance Taylor (ian@cygnus.com)
* Portability fixes from p3:
	coffcode.h (coff_write_relocs): removed sanity check until it
	works on all targets (per advice from sac).
	config/hp9000.mh: new file to define USG.
	hppa.c: #undef hppa before the JUMP_TABLE.
	hosts/hppahpux.h: #define NATIVE_HPPAHPUX_COMPILER if not
	__STDC__.
	targets.c (bfd_target_list): if NATIVE_HPPAHPUX_COMPILER, make
	local variable target volatile to avoid mysterious bug in
	HP9000/700 cc.
1992-09-29 15:47:03 +00:00
John Gilmore b85bd0c182 * config/hppabsd.mh, config.hppahpux.mh: Remove various bogosity.
* hosts/hppahpux.h:  Remove bcopy and index circumventions.
1992-09-26 11:00:36 +00:00
John Gilmore df4d92f60f Lint; remove bcopy/bzero. 1992-09-26 05:39:13 +00:00
John Gilmore 218ce93030 Add Adobe a.out support.
* aout-adobe.c:  New file.  So far, only reads a.out.adobe.  FIXME.
* config/adobe.mt:  Add.
* configure.in (*-adobe-* target):  Add.
* targets.c (a_out_adobe_vec):  Add.
* Makefile.in:  add aout-adobe.c.

* configure.in:  Put two dashes in all entries to be matched.
Add comments to remind people to do this.
Reorder all entries that match manufacturer names, to occur
last, so they will only be matched if no more specific match
occurs.  Remove manufacturers `aout', `bout', `coff', and `elf'.
1992-09-26 02:20:05 +00:00
Brendan Kehoe 13ff13438b * elf.c (section_from_elf_index): Return bfd_abs_section, not 0,
since we should never have a NULL section.
	(elf_slurp_symbol_table): If st_shndx doesn't match any of our
	tests, set the section to bfd_abs_section.
1992-09-25 22:05:15 +00:00
Steve Chamberlain 8ad2a31dd8 Fri Sep 25 11:11:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* coff-z8k.c: getting closer
	* coffcode.h (coff_get_relocated_section_contents): allow
	EXTRA_CASES hooks for different arches to provide different reloc
	types.
	* seclet.h: #ifndef around it to allow multiple inclusion
	* srec.c: minor doc fix
1992-09-25 18:14:29 +00:00
Fred Fish 88a29612cc * configure.in: Use i386-elf for all i386/i486 sysv4 hosts, not
just ncr.
1992-09-20 15:50:12 +00:00
Ken Raeburn 292dc23953 fix uninitialized pointer when reading relocs 1992-09-18 16:33:16 +00:00
Ian Lance Taylor dc999ad933 Fri Sep 11 15:37:06 1992 Ian Lance Taylor (ian@cygnus.com)
* coffcode.h (coff_renumber_symbols): set the last renumbered
	symbol pointer to NULL, as expected by coff_write_linenumbers.
	(coff_write_relocs): apparently a non-zero addend is OK for reloc
	type R_IHCONST used on the 29k.
1992-09-11 22:43:53 +00:00
John Gilmore c00bab93f0 * opncls.c (bfd_fdopenr): Determine whether to fdopen for
update, based on how the underlying file was opened.  Obsoletes
FASCIST_FDOPEN.
* hosts/rs6000.h, hosts/tahoe.h, hosts/vaxbsd.h:  Remove
all FASCIST_FDOPEN config defines.
1992-09-10 20:31:10 +00:00
Ken Raeburn 54a9da01d3 move out sparc-opc.c 1992-09-09 01:48:41 +00:00
Ian Lance Taylor 45441dd5a2 Found by IBM-France. gcc can warn about this sort of thing....
Tue Sep  8 10:10:34 1992  Ian Lance Taylor  (ian@cygnus.com)

	* aoutx.h: adjust_sizes_and_vmas did not return anything.
1992-09-08 17:13:53 +00:00
Jim Wilson c409bc28dc Remove extraneous, but harmless, backslash from last change. 1992-09-03 23:17:41 +00:00
Per Bothner cf25833989 Bump to version 2.0. 1992-09-03 21:18:04 +00:00
Stu Grossman 4e5ff049bc * bout.c, cpu-z8k.c: Use enums when initializing structs to keep
braindamaged HP/Apollo compiler happy.
1992-09-03 16:10:13 +00:00
Per Bothner ef2810d07e * Makefile.in: Added mostlyclean/clean/distclean rules. 1992-09-02 07:27:31 +00:00
Per Bothner 66945e8a30 Note previous change (removing oasys from target_vector). 1992-09-01 20:42:42 +00:00
Jim Wilson 71703b0735 Update to SPARC Version 9 Draft 1.0.4. 1992-08-31 17:14:50 +00:00
Steve Chamberlain 2768b3f763 * aoutx.h (aout<n>swap_ext_reloc_out), bout.c
(b_out_squirt_out_relocs): fix bug 1506 where abs symbols attached
	to the built-in abs_section were not written out correctly.
1992-08-31 15:10:34 +00:00
Ian Lance Taylor 0a62e9bd9f Fri Aug 28 16:29:15 1992 Ian Lance Taylor (ian@cygnus.com)
* archive.c (bfd_slurp_bsd_armap): if the symdef_count is too
	large, assume we're using a swapped byte order and fail with
	wrong_format rather than dumping core.
1992-08-29 00:17:55 +00:00
Ken Raeburn cf24f26c84 Missed one... 1992-08-28 22:44:19 +00:00
Ken Raeburn 71c1f4043f Renamed opc-sparc.c to sparc-opc.c for more significant characters in cpu
name under losing file systems ("sparc-op" rather than "opc-spar").
1992-08-28 22:42:58 +00:00
Ian Lance Taylor 8e3d11580a Thu Aug 27 17:01:04 1992 Ian Lance Taylor (ian@cygnus.com)
* targets.c, config/i960-bout.mt, hosts/*: added
	HOST_BIG_ENDIAN_DEFAULT_VECTOR and
	HOST_LITTLE_ENDIAN_DEFAULT_VECTOR because bout archive format
	depends on the endianness of the host.  Added #define
	HOST_BIG_ENDIAN_P and #undef HOST_BIG_ENDIAN_P to a number of
	configuration files in hosts/ (it was already in some).
1992-08-28 00:08:13 +00:00
Brendan Kehoe 9990f965a2 Add preliminary support for the we32k (AT&T 3b2 and family). 1992-08-27 22:08:01 +00:00
Steve Chamberlain 3be5606231 * bout.c: added support for relaxable alignment relocs.
* seclet.c (rel, seclet_dump_seclet, seclet_dump): get the app to
	pass down pointer to play area rather than use alloca
1992-08-27 00:35:09 +00:00
Steve Chamberlain f21798cad0 * cpu-z8k.c (compatible): made static to reduce name space
polution.
1992-08-26 21:21:20 +00:00
Steve Chamberlain b5d20c939d Move a patch which got put in the wrong place. 1992-08-25 15:40:52 +00:00
Steve Chamberlain 2677d4b576 * ieee.c (ieee_get_symtab): always null terminate the symbol list,
lint.
1992-08-24 21:53:04 +00:00
Steve Chamberlain 9465d03ed5 * coffcode.h (coff_add_missing_symbols): if symbols don't come
from a coff file (csym is null), dont deref them

	* ieee.c (parse_expression): get the answer right when adding an
	abs+(sec+off), (ieee_generic_stat_arch_elt): call ieee_object_p
	on elts so that filename is filled in.
1992-08-24 19:10:06 +00:00
Ken Raeburn 1412425734 enough align-reloc support for "objdump -r", not enough for linking 1992-08-20 23:13:33 +00:00
Ian Lance Taylor 967d40ca76 Moved in from p3:
Tue Aug 18 12:57:45 1992  Ian Lance Taylor  (ian@cygnus.com)

 	* Makefile.in: added FLAGS_TO_PASS, and used it for all recursive
	invocations of make.  Also, always create installation
	directories.

	* config/apollov68.mh: removed -g from CC definition.
1992-08-18 20:24:22 +00:00
Ken Raeburn 9425505486 * config/decstation.mh (HDEFINES): Specify "-G 4" to avoid
overflowing gp-offset range.
1992-08-17 20:42:16 +00:00
Steve Chamberlain b15aa5129e * srec.c (srec_set_section_contents): don't write out sections
without the LOAD and ALLOC attributes
1992-08-17 19:29:07 +00:00
Ken Raeburn 2b795743bf * archures.c, cpu-m68k.c, cpu-sparc.c: Undo 16 June changes.
* libaout.h (struct aout_backend_data): New callback "set_sizes".
* aout-target.h (callback): Don't set page/seg sizes.
(mkobject): Ditto.
(set_sizes): New routine.
(backend_data): Point to it.
* aoutf1.h (sunos4_set_sizes): Heed architecture when setting sizes.
(sunos4_aout_backend): Point to it.
* aoutx.h (set_arch_mach): Call set_sizes callback.
1992-08-17 16:04:19 +00:00
Per Bothner 582bc90a63 * aout-target.h: Make _bfd_slurp_extended_name_table be
the default.  Given that we *write* the suckers (for long
	archive member names), we really ought to be able to read them!
	* trad-core.c:  Don't include <machine/reg.h>.  It doesn't
	seem to be needed, and many machines don't have it.
1992-08-15 02:27:58 +00:00
Steve Chamberlain 73f30e4908 * coff-m68k.c (vector): read and write archives in coff format. 1992-08-13 16:54:50 +00:00
Ken Raeburn 6bb4c92322 moved sparc opcode table to bfd 1992-08-11 16:57:29 +00:00
Fred Fish 671450818a * bout.c (bfd_reloc_status_type, callj_callback): Cast void*
pointers to bfd_byte* before performing arithmetic on them.  Such
	use with bare void* pointers is a gcc extension.
	* cache.c (bfd_cache_delete):  Forward decl with prototype form.
	* archive (normalize):  Add to CONST to match actual usages with
	CONST.
1992-08-09 06:16:44 +00:00
Fred Fish eafc6d85c6 * configure.in: Recognize i486 host cpu, and use i386-elf
for i486-ncr-sysv4.
1992-08-03 07:36:45 +00:00
Fred Fish 6030489a3a Back out of ill-considered addition of support for SHT_BEPROGBITS. 1992-08-02 15:48:21 +00:00
Fred Fish 3dfa6cfb66 * config/stratus.mt (CC): Remove definition.
* elf.c (bfd_section_from_shdr, elf_section_from_bfd_section,
	section_from_elf_index):  Add SHT_BEPROGBITS case for i860 in
	big endian mode.
	* elf.c (bfd_section_from_shdr):  Test for the possibility that
	section_from_elf_index returns NULL and don't dereference it.
1992-08-01 20:51:09 +00:00
David Henkel-Wallace 9e2b3581cb HP host support 1992-07-23 19:44:30 +00:00
K. Richard Pixley 5ae97f7d26 removed rcsids 1992-07-18 01:34:19 +00:00
K. Richard Pixley 8df9af77ca merged changes from progressive 1992-07-16 23:49:40 +00:00
Steve Chamberlain 31f333a39f * coff-m68k.c: added R_RELLONG_NEG reloc type, and changed
RTYPE2HOWTO to cope with same.
	* reloc.c (bfd_perform_relocation): added support for size of -2
	(subtract a word reloc type). Updated doc.
1992-07-16 23:44:53 +00:00
K. Richard Pixley 5f1b6dd222 removed rcsid 1992-07-16 23:42:42 +00:00
K. Richard Pixley 542afc7675 removed rcsid 1992-07-16 23:28:40 +00:00
Steve Chamberlain b58e918004 * bfd-in.h : add BFD_IS_RELAXABLE flag
* bout.c (bout_swap_exec_header_[in_out]): new field in exec
	header e_relaxable, major hackery in callbacks
	* libaout.h : add space for a_relaxable.
	* seclet.c (rel): don't relax empty sections
1992-07-16 15:12:28 +00:00
Steve Chamberlain dc2239ac77 Extra lint 1992-07-15 14:59:45 +00:00
Steve Chamberlain f6681656c1 * archive.c (bsd_write_armap): write the timestamp of the
archive header to be just a little bit later than the timestamp of
	the file, otherwise the linker will complain that the index is
	out of date.
1992-07-08 23:28:21 +00:00
Fred Fish 967e8d7a5a * configure.in: Add m68k-ericsson-*. 1992-07-07 07:24:25 +00:00
John Gilmore a1f6632789 * syms.h: Define BSF_FILE, update BSF_SECTION_SYM desc.
* elf.c:  Remove unconditional debug printf's.
(elf_write_object_contents, elf_slurp_symbol_table):  Handle
BSF_SECTION_SYM <=> STT_SECTION, BSF_FILE <=> STT_FILE.
(elf_slurp_symbol_table):  Hand out symbols in forward, not
reverse order.  Simplify duplicate code.
1992-07-04 10:38:33 +00:00
Fred Fish 97225e37f7 * elf.c: Remove "(void)" casts from function calls where the
return value is ignored, in accordance with GNU coding standards.
1992-07-04 03:24:37 +00:00
Fred Fish fbc2750e39 * hppa.c: Apply John's standard fix to avoid "empty translation
unit" warnings from some ANSI-C compilers.
1992-06-30 23:50:04 +00:00
John Gilmore c40dbf26ab * hosts/solaris2.h: Configure same as sysv4. 1992-06-25 11:40:36 +00:00
Fred Fish ec6b2951da * libbfd.h, libbfd-in.h (bfd_seek): Make prototype match definition.
* reloc.c (bfd_default_reloc_type_lookup):  Make cast on return
	type match actual return type.
	* elf_print_symbol (section_name):  Make CONST.
1992-06-24 04:56:01 +00:00
Per Bothner f74d99418e * i386linux.c, hosts/i386linux.h, config/i386-linux.mt:
New files, for Linux (a free Unix clone for 386 machines).
	* Makefile.in, configure.in, targets.c:  Update accordingly.
1992-06-23 01:05:47 +00:00
Steve Chamberlain 3860075f3f Fri Jun 19 20:23:21 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Lints for bfd_reloc_code_type->bfd_reloc_code_real_type, and
	correct calling of howto special functions and fixes from Raeburn
	for gas<>bfdness
	* archures.c: nuke bfd_reloc_code_type
	* bout.c, cpu-h8300.c, coff-i960.c, coff-m88k.c: special function lint
	* coffcode.h (styp_to_sec_flags): STYP_INFO is marked as
	SEC_NEVER_LOAD, various other bfdgas newness
	* reloc.c->libbfd.h: change protype of bfd_default_reloc_type_lookup
	* targets.c: change jump table vector to above
1992-06-22 15:42:38 +00:00
John Gilmore 796aae470c * elf.c (bfd_elf_find_section): Mark as INTERNAL_FUNCTION so
its prototype will be included in libbfd.h.  Change result type
to struct * (rather than equivalent typedef) so it can be used in
the prototype, where they typedef won't be known.
* libbfd.h:  Updated version.
1992-06-20 02:04:20 +00:00
Stu Grossman e3c01e92af * Makefile.in, archures.c, configure.in, cpu-hppa.c, hppa.c, libhppa.h,
targets.c:  HPPA merge.
1992-06-19 22:24:13 +00:00
John Gilmore cf9395e5f5 * configure.in: Separate Solaris2 from SYSV4 on SPARC.
* config/solaris2.mh:  Kludge around Sun compiler bug.
1992-06-19 19:22:36 +00:00
Stu Grossman 547c0cb55c * libaout.h (aout_backend_data): Change defs of two bitfields to
be unsigned chars instead to get around rs6000 compiler problem.
1992-06-17 21:05:49 +00:00
Fred Fish 91f781ffbb * elf.c (bfd_section_from_shdr, elf_slurp_symbol_table):
Correct misconception that there can be only one symbol table.
	Only call elf_slurp_symbol_table on the full symbol table, not
	the dynamic one which is only a subset of the full one.

	(The bfd library was slurping in the first ELF symbol table it
	found and then ignoring any others.  For dynamically linked
	executables, this happened to be the dynamic symbol table, which
	is a subset of the full symbol table and only contains the
	symbols that need to be used in dynamic linking.)
1992-06-17 20:58:46 +00:00
Ken Raeburn 5e16788678 Don't align sections in I960 coff files.
(I know there's a GDB freeze on, but this only affects writing i960
coff files, and Steve needs it ASAP.)
1992-06-17 20:06:33 +00:00
Ken Raeburn 41729eb4b0 Various changes to get linker working again for a.out:
* don't set/adjust section file positions or vmas more than once
 * use correct page size and segment size when calculating them
 * deal with some variations in a.out implementations
Tested on sun4 and sun4->sun3 so far, will be testing further but
needed to get wider exposure&testing.  See ChangeLog for details.

Also:
* coffcode.h (coff_write_relocs): Write out swapped reloc, not
pre-swapped version.
* hosts/sparc.h (abort, exit): Hide these names if compiling with
gcc version 2, to avoid warnings.
1992-06-16 11:34:07 +00:00
Fred Fish 28d2c686f4 * config/ncr3000.mh (INSTALL, RANLIB): Don't use /usr/ucb/install,
it's broken on ncr 3000's.  Use simple "true" for RANLIB.
1992-06-15 19:27:49 +00:00
John Gilmore 1e730c4b08 * section.c (STD_SECTION): Remove extra semicolon in declarations.
* configure.in:  Rewrite target parsing to use simple format.
Handle sparc-sun-solaris2 configuration.
* aout64.h:  Avoid ANSI C brain death warning.
* elf.c:  Avoid trigraph (???) or /* in comments.
1992-06-13 05:58:49 +00:00
David D. Zuhn a52057f811 change to new solaris naming system, add sysv4 host config 1992-06-13 00:43:08 +00:00
John Gilmore 80bdcb77bd * elf.c (elf_obj_tdata): Merge elf_obj_tdata_struct and
elf_core_tdata_struct into a single common struct.  Core files
wouldn't have worked at all without this.
(bfd_elf_find_section):  New function for GDB's undercover use
to find string sections that BFD hides from it.
(elf_get_str_section):  Avoid multiple alloc&reads for same data; lint.
(elf_object_p, elf_core_file_p):  Allocate internal file header
storage dynamically.
* bfd.c (union {...} tdata):  Remove elf_core_tdata_struct.
* demo64.c:  Prevent "empty translation unit" warnings from idiots.
1992-06-11 08:10:04 +00:00
Fred Fish df03b780f4 * config/{i386v4.mh, ncr3000.mh}: Update RANLIB, add INSTALL. 1992-06-10 02:17:08 +00:00
John Gilmore ab37d4f663 * configure.in: Handle Solaris2 as *-sun-sysv4 or as *-sun-sunos5. 1992-06-07 00:03:50 +00:00
Ken Raeburn 20edaa8e77 Lots of changes from gas-bfd work. Includes:
* working reloc lookup support
 * better support for creation of COFF files from scratch
 * misc doc changes, macro tweaks, "const" additions, typo fixes, etc.
 * one or two ugly kludges that should get cleaned up (but what's one
   or two more, in BFD?)
See ChangeLog for details.
1992-05-26 03:23:53 +00:00
David Henkel-Wallace 10dea9ed17 A couple of things from the net. 1992-05-20 06:47:14 +00:00
Steve Chamberlain bbbd93b8e9 Tue May 12 14:08:59 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* coff-a29k.c (perform_reloc): fix bug in jmp/call evaluation
	* coff-h8300.c (reloc_processing): all relocs are relative to
	section start.
	* opncls.c: don't use fdopen on DOS systems

	short patches from Glenn Kasten (glenn@ready.com)
	* target.c: enabled oasys support
	* oasys.c:  Insert . when UNDERSCORE_HACK is enabled,
	fix problem where a relocation which crossed a modification byte
	boundary did not work. Fix problem where a relocation near the end
	of a data record did not work.
1992-05-12 21:42:36 +00:00
Per Bothner 641b6d2b30 * bfd-in.h: Increase version number to 1.97, for consistency with ../binutils.
* Makefile.in:  docdir is ./doc, not ${srcdir}/doc.
1992-05-05 21:21:59 +00:00
Steve Chamberlain 2cfd05621b * bfd-in.h: bump version to 1.96
Major change; changed calling convention for
	 bfd_get_relocated_section_contents so that caller allocates
	 memory for section data.
	* coffcode.h (bfd_coff_get_relocated_section_contents), reloc.c,
	seclet.c, targets.c, bfd.c: reflect new convention.
	* coffcode.h (styp_to_sec_flags): if styp_flags is not a special
	case, then use reasonable default values for SEC_* flags.
1992-05-04 23:42:03 +00:00
Steve Chamberlain b9b40ee01d * coffcode.h (coff_write_object_contents): use RELSZ to work out
size of output reloc struct.
1992-05-02 01:52:39 +00:00
Steve Chamberlain 69e0d34d4d * targets.c, Makefile.in: comment out tekhex for the moment.
* ieee.c: if some places where null pointers were used instead of &bfd_abs_section.
	* configure.in: tandem target is st2000
	* coff-m68k.c: rename static howto_table to global
	m68kcoff_howto_table.
	* bout.c: remove unnecessary abort
1992-05-02 01:41:33 +00:00
Steve Chamberlain 859f11ffd8 * coff-a29k.c: various changes to the way relocations work to cope
with the "new order" and latent bugs.
	* coffcode.h: lint
1992-05-01 20:00:26 +00:00
Steve Chamberlain 5022aea5df * aoutx.h (aout_swap_ext_reloc_out, aout_swap_std_reloc_out)
bout.c (b_out_squirt_out_relocs): treat abs sumbols the right way.
	* reloc.c (bfd_perform-relocation): don't relocate refs to
	absolute symbols if doing a partial link.
1992-04-29 19:40:35 +00:00
Stu Grossman 7b42a5d9ff * configure.in: Add a29k-amd-udi. 1992-04-24 14:37:32 +00:00
Fred Fish 55c0061edd aoutx.h (aout_<bits>_swap_exec_header_in): Zero out the internal_exec
structure before initializing the fields that are used, so that the unused
fields are in a known state.  Two of these structures are memcmp'd so
any fields not explicitly initialized must be set to a known state.
1992-04-24 01:42:41 +00:00
Fred Fish be2d8c134a Convert typedef that typedefs nothing into a normal structure declaration.
Prototype args to function that second arg of pass_over points to.
1992-04-22 16:40:35 +00:00
K. Richard Pixley 6e491a87f9 rework CFLAGS, etc. 1992-04-21 05:27:57 +00:00
K. Richard Pixley 30662ca6a8 Add .NOEXPORT: so that doc directory doesn't inherit a bad definition
for target_makefile_frag.
1992-04-16 01:23:41 +00:00
Fred Fish e4b9dd935b Ifdef-out debugging code, and ifdef-out code that aborts on unhandled
sections (this was causing needless gdb aborts; gdb doesn't care about
these sections anyway).
1992-04-15 05:32:58 +00:00
Fred Fish 808dfd5aab Fix couple of function args that expect to be passed CONST pointers, and
boolean functions that were returning NULL, which can be "void *" rather
than just bare 0.
1992-04-14 21:41:30 +00:00
Fred Fish 5868184b8d Pass on MINUS_G to recursive makes. Recognize ncr3000 config. 1992-04-11 05:38:40 +00:00
John Gilmore adf5061ceb * archive.c, bfd.c, bout.c, coffcode.h, init.c, reloc.c,
section.c, srec.c, syms.c, coff-h8300.c:  Lint.
1992-04-02 07:26:31 +00:00
Fred Fish d4acec2c22 Fix to use a single disposable copy of section header table and program
header table entries.
1992-03-28 21:10:05 +00:00
John Gilmore 17904eeb4d Set MINIMIZE to 0 for a real release. 1992-03-27 01:00:58 +00:00
Stu Grossman 2b7eef3c57 * coff-msym.c (ecoff_swap_rfd_in): remove & for array ref. 1992-03-24 06:39:01 +00:00
Per Bothner afbdd10672 * bout.c (b_out_slurp_reloc_table): Use BFD_ASSERT macro,
not internal bfd_assert function (twice).
1992-03-17 22:14:18 +00:00
Steve Chamberlain b772312e68 * aout-target.h: change ar_max_namelen to 15 (the right value)
* coff-a29k, coffcode.h: more hangovers from the bfd_abs_section
	change
1992-03-17 18:47:16 +00:00
Steve Chamberlain fc2f4c758a Remove i960 b.out bitrot. 1992-03-16 22:59:58 +00:00
Fred Fish 009898fddb Convert calls to bare malloc() to bfd_xmalloc(). 1992-03-15 01:33:32 +00:00
K. Richard Pixley 935325ad0f pass MAKEINFO on recursion 1992-03-14 02:54:17 +00:00
Per Bothner 2a274d5d19 * libbfd-in.h (set_tdata): Make change of Feb 27 in the
actual source file, not just the generated libbfd.h.
1992-03-12 19:17:28 +00:00
John Gilmore 77c3feeed1 mips-big-* target 1992-03-12 06:08:56 +00:00
Steve Chamberlain d446483b5e * coff-i960.c (icoff_little_vec): add COFF_SWAP_TABLE so we can run gdb on little
endian 960 code.
	* archive.c (compute_and_write_armap): indirect symbols should go
	into the archive header too.
1992-03-07 18:36:38 +00:00
John Gilmore 5c12fcf521 * coff-msym.c: Move this file from gdb/ecoff.c. It
handles byte-swapping for ECOFF (MIPS symbol) files.
1992-03-06 07:53:38 +00:00
Steve Chamberlain e7b4046cbf Don't core dump if no output section available for a symbol 1992-02-27 19:22:41 +00:00
Steve Chamberlain 6db82ea7e5 * aoutx.h (translate_from_native_sym_flags): when creating an alias symbol, fill in the section as undefined, rather than leaving it blank 1992-02-27 17:26:08 +00:00
Steve Chamberlain 1d535e75df Wed Feb 26 19:40:59 1992 Steve Chamberlain (sac at thepub.cygnus.com)
* bfd.c: lint
	* coff-h8300.c: fix stupid reloc subtraction bug
	* coffcode.h (coff_swap_aux_out): only swap a tvndx by 2 bytes,
	since that's how wide it is. (coff_slurp_symbol_table): always zero out
	the symbol.flags and done_lineno fields.
1992-02-27 03:52:15 +00:00
Steve Chamberlain d05511ca57 * coffcode.h (coff_swap_aux_in): lint, (coff_print_symbol): prints
out tagndx too.
	* aoutx.h (swap_std_reloc_out, swap_ext_reloc_out): use the output
	section of a symbol rather than the section of a reffed symbol to
	determine the r_index of an emmitted reloc.
1992-02-21 19:06:34 +00:00
Per Bothner 73afbe2809 * PORTING: New (preliminary) porting guide. 1992-02-21 05:56:57 +00:00
John Gilmore 8b87cbae28 * bout.c (callj_callback), coff-a29k.c (a29k_reloc), coff-m88k.c
(howto_hvrt16):  lint.
1992-02-20 16:31:21 +00:00
Per Bothner 9832e16cc3 * hp300bsd.c (new), config/mt-hp300bsd: Make hp300bsd
a full configuration (with possible cross-development),
	instead of using host-aout.c.
1992-02-17 20:04:21 +00:00
Per Bothner adf441b919 * aout-target.h (MY(write_object_contents):
Set obj_reloc_entry_size (abfd).
	* gen-aout.c:  Change to emit a .c files, not a .h file.
1992-02-16 21:05:54 +00:00
Fred Fish 5b3fb53040 Remove obsolete use of BSF_ABSOLUTE and replace with bfd_abs_section ref. 1992-02-14 04:13:53 +00:00
Steve Chamberlain a0f3f080c1 * coffcode.h (get_normalized_symtab): fixed bug where symbols
with more than one auxent can cause nasty core dumps.
1992-02-14 01:37:56 +00:00
Steve Chamberlain 7e1131e1f0 * aoutx.h: (translate_from_native_sym_flags): fix constructor
stuff to use the New Order.
1992-02-04 23:42:34 +00:00
Stu Grossman eca85ebe09 * elf.c (bfd_section_from_shdr): Deal with null return from
bfd_make_section().  (elf_object_p):  Select endianess properly.
1992-01-31 09:37:59 +00:00
John Gilmore e702d26e3b Fix stack in core files. 1992-01-31 09:20:58 +00:00
John Gilmore ab68b260f6 * hosts/h-hp300bsd.h, h-tahoe.h, h-vaxbsd.h, h-vaxult.h:
Specify byte order.
* hosts/h-vaxbsd.h:  Define the form of exec and core files.
1992-01-31 07:59:13 +00:00