Commit Graph

293 Commits

Author SHA1 Message Date
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