Commit graph

466 commits

Author SHA1 Message Date
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
John Gilmore
3863d64f95 * Makefile.in: host-aout.c doesn't depend on aout-params.h.
* aout-target.h:  Use TARGET_BIG_ENDIAN_P to set up vector.
* host-aout.c:  Don't use aout-params.h; configure these systems
in their xm files, not in a randomly generated file.
1992-01-31 07:54:12 +00:00
Per Bothner
ab43e4e35c Change DEFAULT_VECTOR to host_aout_vec here as well. 1992-01-30 21:04:42 +00:00
Stu Grossman
fa8c88b29d * host-aout.c: Change TARGETNAME to "a.out" to be compatible with
gdb.  config/mt-hp300bsd:  Change DEFAULT_VECTOR to host_aout_vec
to prevent undefined symbol.
1992-01-30 19:42:52 +00:00
Steve Chamberlain
21a7f8b6de Various lints found on PersSony
* aoutx.h: cast an enum
	* coff-a29k.c: many ints in reloc structure turned to enum
	* coffcode.h: more enums
	* cpu-h8300.c: more enums
	* opncls.c: more enums
1992-01-30 15:30:34 +00:00
John Gilmore
d89b9f991b * configure.in: Make Tahoe configuration work again.
* bfd-in.h:  Remove trailing comma from enum declaration.
* ieee.c:  Can't put byte values >0x7F into a signed char.
1992-01-30 09:21:33 +00:00
Fred Fish
d01cd8fc75 Makefile.in: Add dependencies for various coff-*.o files.
elf.c:  Remove extraneous paren from core_prpsinfo and core_prpstatus
macros, rename core_prpstatus to core_prstatus.  Replace references to
old section "size" member with new "_raw_size" member.  Implement
elf_make_empty_symbol, which is now used.
1992-01-29 05:16:49 +00:00
Steve Chamberlain
087eb65291 * coffcode.h (bfd_coff_relax_section): now static.
(bfd_coff_get_relocated_section_contents): various type lints.
1992-01-28 18:48:07 +00:00
Steve Chamberlain
6590a8c953 New entry point in the transfer vector - bfd_relax_section.
* aout-target.h: add to vector, call generic_relax
	* bfd-in.h: add to vector
	* bfd.c: add #define for vector
	* bout.c: add to vector, call generic_relax
	* coffcode.h: add to vector, also now has coff specific relax code
	for the relaxable H8/300 relocs. Also clean up abs section cruft.
	* elf.c: call generic_relax
	* ieee.c: call new vector, clean up some bugs due to the creation
	of bfd_abs_section
	* libbfd.h: add bfd_generic_relax_section EXFUN
	* oasys.c: call generic_relax
	* reloc.c: implement generic_relax
	* seclet.c: moved much of this into coffcode.h
	* srec.c: call generic_relax
	* targets.c: define new transfer vector
1992-01-28 06:01:25 +00:00
Steve Chamberlain
e98e6ec111 Uses the new small reloc type now.
Currently self hosts on sun4 and sun3
1992-01-24 22:44:51 +00:00
Fred Fish
026fba8c3e Declare various filename variables to be CONST since they are initialized
to point to a CONST char string.  Fixes gcc moans and groans.
1992-01-15 18:06:39 +00:00
Fred Fish
f81059ead7 Document changes to hosts/h-amix.h and hosts/h-i386v4.h. 1992-01-11 01:45:53 +00:00
Per Bothner
3f7607af77 * aoutx.h (NAME(aout,find_nearest_line)): Recognize N_SOL symbols,
so that we can emit the correct file name even if it's an include file.
1992-01-10 22:54:39 +00:00
Fred Fish
30bf2fd2f0 Change all '#if HAVE_PROCFS' to '#ifdef HAVE_PROCFS'. 1992-01-01 12:24:48 +00:00
Fred Fish
2e80a74835 Change svr4 references to sysv4. 1991-12-20 20:11:03 +00:00
Stu Grossman
9c96a6bcb0 * bfd-in.h, libaout.h: ANSIfy enums. 1991-12-19 01:19:14 +00:00
Steve Chamberlain
56f5e00599 * archive.c (normalize): created version for VMS which removes the
VMS directory crap from the front and end of a filename, eg turn
	[-.foo]bar.obj;123 into bar.obj
	(bfd_construct_extended_name_table): now writes index into an
	extended name table in decimal - the same base used to read an
	extended name table.
1991-12-19 00:15:54 +00:00
Fred Fish
e83f304031 Enclose corename and execname inside a HAVE_PROCFS ifdef, since they
are unused when it is not defined.
1991-12-18 03:51:33 +00:00
John Gilmore
c0fcc20765 * hosts/h-*.h: Configure fopen using ../include/fopen-*.h
rather than N copies of the same lines.
1991-12-13 05:02:20 +00:00
Steve Chamberlain
05c6bf2f0b * cpu-h8300.c: disassemble branch displacements correctly
* coff-h8300.c: put reloc offsets out in 32bits
1991-12-12 02:29:39 +00:00
Steve Chamberlain
b4e2425020 * cache.c: fopen with new macros is needed for DOS.
* opncls.c, coff-rs6000.c: more fopens with macros.
1991-12-12 01:23:11 +00:00
Steve Chamberlain
b645b63248 * makefile.dos, configdj.bat: New files from DJ
* cache.c: fopen with "b" is needed for DOS.
	* ieee.c: environ renamed to envi to stop an include file
	conflict.
	* opncls.c: more fopens with "b"
1991-12-12 00:42:50 +00:00
John Gilmore
0713e3236b Merge Rich's and the gdb-4.3 changes. 1991-12-08 00:30:08 +00:00
John Gilmore
2daa942682 This is the version of devo/bfd/ChangeLog that was in the gdb-4.3 release. 1991-12-08 00:27:19 +00:00
K. Richard Pixley
fde8212edc Fri Dec 6 22:58:48 1991 K. Richard Pixley (rich at rtl.cygnus.com)
* Makefile.in: install using INSTALL_DATA, added standards.text
	  support.

	* configure.in: mark directory as target dependent.  configure
	  nows works in objdir always so make file existence checks
	  against ${srcdir}.

Thu Dec  5 22:46:19 1991  K. Richard Pixley  (rich at rtl.cygnus.com)

	* Makefile.in: idestdir and ddestdir go away.  Added copyrights
	  and shift gpl to v2.  Added ChangeLog if it didn't exist. docdir
	  and mandir now keyed off datadir by default.
1991-12-07 07:01:15 +00:00
Steve Chamberlain
4e41b5aa40 *** empty log message *** 1991-12-04 18:16:41 +00:00
John Gilmore
40985bbf13 * bfd.c (bfd_get_mtime): Don't cache mtime any more; only
use the saved value if mtime_set is already set (intended
for archive files, though apparently not used yet).
1991-12-04 10:01:45 +00:00
John Gilmore
01a8219f15 * targets.c: Revise comments about how to configure the target
vector, to match reality.  Remove mention of obsolete methods.
Remove long lists of capitalized macros that turn into the same
thing in lowercase.  Normal vector simply lists all known
lowercase xvec names; all other cases are handled by SELECT_VECS.
1991-12-04 07:39:57 +00:00
Per Bothner
7a5f996269 * archive.c (bsd_write_armap): The pad byte sometimes added to
the string table in a __.SYMDEF member is now
	counted as part of the size of the string table.
	This is compatible with the old ranlib, as well as Sun's.
1991-12-03 22:25:01 +00:00
Steve Chamberlain
706e58f11b * srec.c: Rewrote to fix many bugs; now gets the record type
right, doesn't choke on input, sets the start address in an S9 and
	fills in the filename on an S0.
1991-12-03 18:54:50 +00:00
Steve Chamberlain
0d4b8e3fd2 * cpu-h8300.c: Add support for MEMIND addressing mode 1991-12-01 07:53:50 +00:00
Steve Chamberlain
6cba8f4b78 * coff-a29k.c: defined RELOC_PROCESSING to take the #ifdef out of
coffcode.h
	* coffcode.h: use the new macro if available
1991-12-01 07:37:33 +00:00
Steve Chamberlain
dff5e6026e * elf.c (elf_corefile_note): cast malloc to avoid warning.
* Makefile.in: Fixed dependencies due to file rename
1991-12-01 06:28:28 +00:00
Steve Chamberlain
c3eb25fc25 * aout-encap.c, aoutf1.h, aoutx.h, archive.c, bout.c, coff-a29k.c,
coff-h8300.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c,
	coff-mips.c, coff-rs6000.c, cpu-h300.c, elf.c, i386aout.c,
	newos3.c, stab-syms.c, syms.c: All these files have had their
	#includes altered to point to the new places.
1991-12-01 05:24:02 +00:00
Fred Fish
eb8983c9ca Fix bug in elf.c (missing "break" statements in cases), add ncr and
SVR4 i386 support to configuration.
1991-11-30 04:20:07 +00:00
Per Bothner
3721706073 Two small bug-fixes (affecting ar and nm). 1991-11-29 20:31:57 +00:00
Steve Chamberlain
3b4f1a5d05 * Makefile.in: added coff-h8300
* configure.in: now h8 is a coff target
	* cpu-h8300.c: fix various disassembly problems
	* libcoff.h: took out some code which has been #0ed for a long
	time.
	* targets.c: added h8 coff
	* coff-a29k.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c
	added new macro RTYPE2HOWTO to take a load of #ifdefs out of
	coffcode.h
	* coffcode.h: Started to change the way machine dependencies are
	handled, from the nest of #ifdefs to macros defined in the
	including coff-<foo>.c
1991-11-27 16:56:08 +00:00
John Gilmore
e6e265ce3a Fix hp300bsd entry point problem. 1991-11-23 03:20:41 +00:00
John Gilmore
853f0a7030 * coff-mips.c, coffcode.h: Peter Schauer's patch to kludge in
nonstandard MIPS sections (.rdata, .sdata, etc).
1991-11-22 23:02:29 +00:00
John Gilmore
f8adc62df4 const lint 1991-11-22 19:09:03 +00:00
John Gilmore
8c4a1ace3d ALIGN->BFD_ALIGN 1991-11-22 16:45:04 +00:00
John Gilmore
1e310759ec Lint 1991-11-22 16:22:01 +00:00
John Gilmore
f39eae7baa Lint 1991-11-22 16:14:23 +00:00
Per Bothner
7de245d362 Moved bfd_stab_name() and bfd_stab_names[]
from syms.c to new file stab-syms.c.
	Renamed to  aout_stab_name() and aout_stab_names[].
	Also, since GNU extended type codes such as N_SETT are no longer
	in ../include/stab.def, include them manually.
1991-11-22 05:00:08 +00:00
John Gilmore
98d4310737 * libaout.h (WORK_OUT_FILE_POSITIONS): One more try at this
rather complicated seeming problem.  Eliminate LOGICAL_ versions,
just make N_XXX work by excluding the header from the text segment.
* aoutx.h:  Fix comments to match.
1991-11-21 19:52:23 +00:00
Per Bothner
c9f19dac96 * aoutx.h (NAME(aout,print_symbol)): Fix thinko.
* syms.c (bfd_stab_names):  Turn on new GNU_EXTRA_STABS macro
	to include names of N_SETT etc.
1991-11-15 03:53:14 +00:00
Fred Fish
58df00e9aa Add minimal support for reading ELF symbol files and generating canonical bfd
symbol tables.  Also change the names of some functions.
1991-11-15 03:26:58 +00:00
Fred Fish
7d68537f73 Trivial change to comment to remove redundant "to". 1991-11-15 03:14:20 +00:00
Steve Chamberlain
56b10d6dee * ieee.c: (ieee_object_p) cast NULL correctly.
* configure.in: added harris host
1991-11-13 19:27:21 +00:00
Steve Chamberlain
6ea296a6fd *** empty log message *** 1991-11-13 17:10:23 +00:00
John Gilmore
5685fb5005 Just use #undef, not #define foo foo 1991-11-12 15:22:22 +00:00
Steve Chamberlain
080f6324d6 Mon Nov 11 20:30:18 1991 Steve Chamberlain (sac at cygnus.com)
* Makefile.in: standardize on MINUS_G to disable debugging
	* coff-m88k.c: create coff armaps instead of bsd ones.
	* opncls.c (bfd_close_all_done), (bfd_close): Mask out random bits
	when calling chmod.
1991-11-12 04:32:57 +00:00
Fred Fish
4807bcf9a3 Additions to support ELF formatted core files. 1991-11-12 03:12:26 +00:00
Per Bothner
ff7ce1700b * aoutx.h (NAME(aout,find_nearest_line)): Handle the case
of two N_SO stabs, one for directory, and one for filename.

	* bfd-in.h (print_vma):  Factor out duplicate definition.

	Exit a little more gracefully when malloc returns NULL.
	* libbfd.c: New function bfd_xmalloc (malloc wrapper).
	* opncls.c, syms.c, bout.c, aoutx.h:  Replace malloc by bfd_xmalloc.
	* libbfd.h: Rre-generated due to libbfd.c update.
1991-11-12 02:46:26 +00:00
Fred Fish
f135f137a9 Document use of elf_big_vec as DEFAULT_VECTOR. 1991-11-09 21:51:52 +00:00
Fred Fish
a6c1d73165 Don't try to create a bfd section for the first ELF section header table
entry, since it is just a placeholder with no name.
1991-11-09 21:48:15 +00:00
John Gilmore
285dbe1917 * coff-rs6000.c, config/mh-rs6000: Make it work on archive and
core files, when compiling native.
* hosts/h-rs6000.h:  Define FASCIST_FDOPEN for bfd_fdopenr.
1991-11-09 11:13:02 +00:00
Steve Chamberlain
85e0c72139 Thu Nov 7 11:03:55 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* coffcode.h: Defined new macros [PUT|GET]LINENO_LNNO for
	manipulation of lnno fields in lineno structs in a coff-<f>.h
	independent way. Override it in coff-<f>.h to your favourite
	number if you don't have a 16bit lnno field. (coff_swap_lineno_in)
	(coff_swap_lineno_out): modified to use the new macros.
1991-11-07 19:06:38 +00:00
Steve Chamberlain
522e0ead63 Sat Nov 2 14:26:03 1991 Steve Chamberlain (steve at cygnus.com)
* Makefile.in: Added ctor.c
	* archures.c (bfd_default_arch_struct) added
	bfd_default_reloc_type_lookup.
	* coffcode.h: removed a load of #if 0ed code.
	(coff_compute_file_section_positions): now works out the section
	alignment and size correctly in all cases.
	(coff_get_symtab): looks for contructor symbols and calls the
	right function when they're found. (coff_canonicalize_reloc):
	knows when a section is full of contructors and does the right
	thing.
	* cpu-m88k.c: Added default_reloc_type lookup to the architecture
	description.
	* libbfd-in.h: (bfd_default_reloc_type_lookup) defun  added.
	* libcoff.h: removed #if 0ed code
	* reloc.c: (bfd_reloc_code_real_type) added BFD_RELOC_CTOR for
	arch independent contructtor relocation type.
	(bfd_reloc_type_lookup): removed the comment "this will go away"
	since it won't. (bfd_howto_32): stolen from 88k, this is a 32bit
	reloc which is used when BFD_RELOC_CTOR falls through to give a
	default 32bit reloc for contructors.
	(bfd_default_reloc_type_lookup): added.
	* aoutf1.h: fixed SEGMENT_SIZE typo.
1991-11-04 00:35:19 +00:00
Per Bothner
e18e24af07 * bfd-in.h (bfd_print_symbol_type_hopw enum): Add new option
bfd_print_symbol_nm, for use by nm.
	* aoutx.h (NAME(aout,print_symbol)):  Add code for new
	bfd_print_symbol_nm option, to print in nm format.
	* coffcode.h (coff_print_symbol), ieee.c (ieee_print_symbol)
	oasys.c (oasys_print_symbol):  Provide stub implementations
	for bfd_print_symbol_nm.
	* syms.c:  New function bfd_decode_symclass, used by nm printer.
	New function bfd_stab_name to look up string name of stab code.
1991-11-03 22:47:50 +00:00
John Gilmore
6d7c88c3d0 * coff-rs6000.c: Change name to "aixcoff-rs6000", to avoid
matching prefix "coff".
* coffcode.h (coff_swap_aux_in, coff_swap_aux_out):  Handle
rs/6000 csect records.
1991-11-01 02:24:43 +00:00
Steve Chamberlain
da6745fd68 * coff-m88k.c, targets.c: change name of m88k_bcs to m88kbcs 1991-10-28 01:18:01 +00:00
Steve Chamberlain
01dd1b2b47 Sun Oct 27 16:56:58 1991 Steve Chamberlain (steve at cygnus.com)
* configure.in: add motorola delta88 cases
	* libbfd.h, libbfd-in.h, archive.c, ieee.c, elf.c, srec.c: fix
	write_armap prototype
	* libbfd.c: add doc on bfd_write_bigendian_4byte_int
1991-10-28 01:08:51 +00:00
John Gilmore
156e38523a * Rename COFF-related files in `coff-ARCH.c' form.
coff-a29k.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c,
coff-mips.c, coff-rs6000.c to be exact.
1991-10-25 10:17:52 +00:00
John Gilmore
cc97dfbba7 RS/6000 support 1991-10-25 07:16:59 +00:00
John Gilmore
cbdc790909 RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and John Gilmore. 1991-10-25 07:06:02 +00:00
John Gilmore
ae9cce45ff Updates to h-vaxult.h from David Taylor. 1991-10-25 02:21:52 +00:00
Fred Fish
e0796d2213 Add partial support for ELF format corefiles. Still needs code to extract
register values from corefiles and make them available to bfd clients.
1991-10-24 10:26:26 +00:00
Fred Fish
7b71de814a In config/t-m68k-elf, set DEFAULT_VECTOR to elf_big_vec. 1991-10-24 09:16:41 +00:00
Fred Fish
dcc23cb9aa Document changes to some bfd config files. 1991-10-24 09:06:06 +00:00
Steve Chamberlain
33a782f1d2 * coffcode.h (coff_compute_section_file_positions): make it pad
section size out if there are alignment restrictions so that the
	image will be ok on a system where section positions are worked
	out by accumulating sizes rather than from the section headers.
1991-10-21 23:58:49 +00:00
Steve Chamberlain
f58809fd41 * targets.c (proto write_armap). Changed orl_count to unsigned.
* opncls.c (bfd_close_all_done). Added so that generative
	programs like gas can close a bfd without causing bfd confusion.
	* libbfd.h (changed becuase of protos)
	* amdcoff.c: messed with the way that jmp displacements are
	calcualated. This may not yet be totally correct.
	* archive.c (coff_write_armap): rewrote the way that ranlibs are
	written out.
	* coffcode.h (fixup_symbol_value): now doesn't core dump if a non
	abs symbol has no section (like a register symbol).
	(coff_write_symbol) now zeros auxent before filling it up to help
	with sensitive applications.
	* libbfd.c (bfd_write_bigendian_4byte_int): added.
1991-10-21 16:42:54 +00:00
Per Bothner
314f3eeda3 * archive.c (bsd_write_argmap): The size of the ranlib structures
should not include teh size field itself.
	* aoutx.h, libaout.h (NAME(aout, sizeof_headers)):  Use
	adata(abfd)->exec_bytes_size field instead of constant macro,
	because aoutx.h compiles to a simple .o file shared by
	all 32-bits a.out targets.
1991-10-16 19:50:08 +00:00
John Gilmore
282effc79f Allow i386-sco-sysv.
Updates from my internet testing for gdb-4.2.
1991-10-16 18:59:59 +00:00
John Gilmore
7b02b4ed6f * hosts/h-amix.h (free): Fix prototype.
* aoutx.h:  Don't use NULL as an integer, for braindead systems
that declare it as (void *)0.  (From Peter Schauer.)
1991-10-15 23:41:17 +00:00
Per Bothner
fd671dc421 * aoutx.h (NAME(aout,set_section_contents)): Try to handle the
various kinds of alignments for the various kinds of
	magic numbers.
1991-10-15 00:24:03 +00:00
John Gilmore
f02be00a6d * Makefile.in: Avoid Sun Make VPATH bugs.
* targets.c:  Declare trad_core vectors extern.
1991-10-12 05:45:57 +00:00
Per Bothner
71fa3b0161 * coffcode.h: Moved ALIGN macro to libbfd.h. Removed i960_align.
* libbfd.h: Moved ALIGN macro here.
	* bout.c (b_out_callback): Replace i960_align by align_power.

	* libaout.h (struct aoutdata):  Added fields page_size,
	segment_size and exec_bytes_size.  These help generic code
	(in aoutx.h and libaout.h) to figure out where to align
	the various segments in a demand paged file.
	* libaout.h (WRITE_HEADER):  Use new (struct aoutdata) fields
	to decide if the exec header counts in a_text (text segment size).
	Also, assume D_PAGED flag is set; don't set it here.
	* bout.c (b_out_callback): Add initialization of
	adata fields page_size, segment_size, and exec_bytes_size.
	* host-aout.c (NAME(host_aout, callback) and
	NAME(host_aout,mkobject): Ditto.
	* i386aout.c (aout386_callback) and new aout386_mkobject): Ditto.
	* newos3.c (newsos3_callback) and new newsos_mkobject): Ditto.
	* aoutf1.c (sunos4_callback) and new sunos_mkobject): Ditto.
	* aoutx.h (NAME(aout,some_aout_object_p)): Don't subtract
	EXEC_BYTES_SIZE from the a_test size; this is only appropriate
	for some systems (mainly sunos), so do it in the callback instead.
	Same routine: Add stuff to the THIS_IS_ONLY_DOCUMENTATION comment.
	* aoutx.h (NAME(aout,set_section_contents): Change the way
	filepos and size of sections are carried out to support
	older styles of demand paged executables.
1991-10-11 20:45:29 +00:00
Steve Chamberlain
0d74098420 * bfd-in.h: Added more macros to COFF_SWAP_TABLE.
* bfd.c: Added macros to enable gas to swap coff records.
	* coffcode.h: Make the coff_swap_*_out routines return the number
	of bytes swapped, and cleaned up their prototypes.
	* configure.in: Added ebmon/coff support
	* ecoff.c: Changed null definitions of coff_swap_*_out to conform
	to new prototypes
	* targets.c: Added new entry points for coff swapping
1991-10-11 19:39:29 +00:00
John Gilmore
23d44ec958 Remove refs to ../include/sysdep.h. 1991-10-11 12:48:25 +00:00
John Gilmore
5b2765bf13 Restructure configuration scheme for bfd, binutils, ld.
* include/sys/h-*.h:  Move to bfd/hosts/h-*.h.
* configure.in:  Revise to symlink sysdep.h to hosts/h-xxx.h.
Change some config names to match other dirs.
* *.c:  Include bfd.h before sysdep.h, so ansidecl and PROTO()
get defined first.
* Makefile.in:  Use -I. to get sysdep.h.
* trad-core.c:  Don't disable the whole file if SUN4_SYS.
* config/:  Rename some config files to match up h-*.h names.
Remove all the HOST_SYS definitions from the config files.
* hosts/h-amix.h, h-i386v.h:  Define POSIX_UTIME, not USG.
* hosts/h-hp9000.h:  Remove USG comment.
* hosts/h-rs6000.h:  Include <stdlib.h> for malloc.
* hosts/h-news.h, h-sparc-64.h:  New config files that had
previously been kludged in the <sysdep.h> file.
1991-10-11 10:43:34 +00:00
John Gilmore
6a46902732 * Makefile.in: Rename XDEPFILES.
* trad-core.c:  Document how to use it nowadays.
* i386aout.c, newsos3.c:  Clean up.
* i386coff.c:  Allow 386 coff files to be used as core files too
(for reading core files from embedded systems).
1991-10-11 04:51:42 +00:00
Roland Pesch
92c78ee6ea * reloc.c, section.c, syms.c, targets.c: correct info-node
structure in *doc* comments.
1991-10-08 19:20:35 +00:00
John Gilmore
9e2dad8ed4 * bfd.c: Remove strerror() to libiberty.
* elf.c:  Remove elf_set_section_contents, use generic one.  Lint.
* libbfd-in.h, libbfd.c:  Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents):  Check that
last byte of transfer, not first byte, is within the section.

* host-aout.c:  Remove `BSD' archive support.  Lint.

* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'.  Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'.  All uses changed.
* reloc.c:  Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'.  Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'.  (This seems to be a misnomer,
it needs a better name.)  All uses changed.
* targets.c:  Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves.  All uses changed.

* configure.in, config/h-i386mach:  i386 mach host.
* config/t-i386-aout:  Use host-aout.c.

* trad-core.c:  Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c:  Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax:  Define TRAD_CORE.
* targets.c:  #ifdef TRAD_CORE, include it in the vector.
1991-10-05 05:18:08 +00:00
Steve Chamberlain
d997da5f3e *** empty log message *** 1991-10-05 00:42:03 +00:00
John Gilmore
f004165ea5 * bfd-in.h: enum boolean => enum bfd_boolean for SVR4. Gumby's
prediction is vindicated!

* bfd-in.h, libbfd-in.h, doc/Makefile, doc/tolibbfd, doc/intobfd:
Remove refs to howto.c, since Steve forgot.
1991-10-04 02:49:06 +00:00
Steve Chamberlain
a55612c73e * elf.c: took the abort out of set_arch_mach so that objdump -i will
still work. Now allows any architecture/machine to be set.
1991-10-03 14:51:20 +00:00
John Gilmore
3f85ebce78 * Makefile.in, configure.in, targets.c, elf.c: Add preliminary
ELF support good enough for GDB.
* configure.in, config/h-amix, config/t-m68k-elf:  Handle
m68k-cbm-svr4 host and target.
1991-10-01 19:46:47 +00:00
Steve Chamberlain
30d2c06f1d *** empty log message *** 1991-10-01 18:29:28 +00:00
John Gilmore
995ee059a1 Avoid depending on number of initializers. 1991-10-01 13:37:14 +00:00
John Gilmore
2ccc238359 Vax Ultrix changes from David Taylor <taylor@think.com>. 1991-10-01 12:08:20 +00:00
Steve Chamberlain
e738d5d264 added:
* amdcoff.c: (a29k_reloc) fix error message.
1991-10-01 03:56:32 +00:00
Steve Chamberlain
4e6f9223b1 Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
	cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
	files will eventually contain processor specific bits for bfd,
	like strange relocation information and dis/assembly.  So far only
	the H8 has been even partially done.  This work also ties in with
	the change in handling architectures.

	* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
	discover the architecture of the bfd. (sunos4_callback) calls the
	function bfd_set_arch_mach rather than stuffing stuff directly
	into the bfd. (sunos4_write_object_contents), changed names of
	accessor functions.

	* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
	setup the environment.

	* archive.c: (bfd_slurp_coff_armap) coff archives always have the
	headers in big endian format, regardless of the endianess of the
	host or target.

	* archures.c: totally changed. Now an architecture is represented
	with a pointer to an info structure rather than an enumerated type
	and a long. The old info is available as two elements in the
	structure.  Future enhancements to architecure support will
	involve pointers to methods being placed into the info structure.

	* bfd.c: changed the definition of the bfd structure for the new
	architecture stuff.

	* bout.c: (b_out_set_arch_mach) changed to use the new
	architecture mechanism.

	* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
	the new architecture mechanism.

	* configure.in: added h8 stuff.

	* ieee.c: too many changes to note.  Now ieee files written with
	bfd gas and ld can be read by gld and ieee only linkers and
	simulators.

	* libbfd.c, libbfd.h: changed prototype of bfd_write.

	* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
	than fixing the structure directly.

	* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
	than fixing the structure directly.

	* opncls.c: (new_bfd) makes sure that bfd_init has been called
	before opening a bfd.

	* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
	rather than fixing the structure directly.

	* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
	in the t/hmake file) a user can select which backends they want
	linked with bfd without changing the source.

	* init.c: new, looks after initializing modules.

	* howto.c: for future use, will allow an application to work out
	what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
John Gilmore
387cbb2bff * srec.c: Better error checking, partly from Peter Schauer.
(srec_object_p):  Avoid assuming any file that starts with 'S' is
an S-record file!  (Check for 3 uppercase-hex digits after it.)
(ISHEX):  Define new macro for checking supposedly hex characters.
(pass_over):  Treat as EOF any S-record line that:
    *  doesn't have hex in either size character
    *  produces a size larger than 0x7F
    *  has an unrecognized type number
1991-09-30 20:50:18 +00:00
John Gilmore
fb3be09b66 Lint (saber actually). 1991-09-26 22:28:46 +00:00
Per Bothner
ac0167e878 * libaout.h (WRITE_HEADERS): Set header's a_text field always.
* newsos3.c: Fixed two types: newos3 -> newsos3.
1991-09-26 18:40:30 +00:00
Per Bothner
d0a27c3b8e Fix bfd_perform_relocation to handle pc-relative relocs better. 1991-09-26 18:26:28 +00:00
Roland Pesch
b5493bc4c8 Thu Sep 12 14:07:22 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
* Makefile.in: $(MAKE) for make, $(docdir) for doc
	* doc/Makefile: redundant dependencies for Sun-make VPATH bug
1991-09-12 21:08:51 +00:00
John Gilmore
f053b34fe8 * aoutf1.h (sunos4_core_file_p): Release the right storage in error case.
(sunos4_core_file_matches_executable_p):  Fix header comparison.
* aoutx.h:  Avoid shifts of 32 bits, undefined in C.  Lint.
* bout.c, icoff.c, ieee.c, libbfd.c, oasys.c:  gcc -O -W lint.
1991-09-11 04:49:53 +00:00
John Gilmore
12e7087f53 Allow GDB to patch object files.
Makefile.in:  Add crude dependencies.
1991-09-04 07:52:46 +00:00
Steve Chamberlain
10effd407e Fixed the line break as a test for cvs ci. 1991-09-03 22:43:19 +00:00
Steve Chamberlain
c67056970a *** empty log message *** 1991-09-03 20:48:27 +00:00
John Gilmore
68b7021279 * configure.in: Tix typo.
* ecoff.c:  If compiling for DEC3100, use trad_unix core files,
        else dummy out the core file support.
        * trad-core.c (trad_unix_core_file_p):  If HOST_DATA_START_ADDR is
        specified, use it to locate the data section.
        * coffcode.h (coff_write_symbols):  Declare buffer as bfd_bytes
        rather than as chars (lint).
1991-08-23 20:55:23 +00:00
Stu Grossman
7d003262a7 saber 1991-08-23 05:26:06 +00:00
Roland Pesch
d51d16c8e6 *** empty log message *** 1991-08-22 18:32:01 +00:00
Roland Pesch
dd260c230b Wed Aug 21 14:33:06 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
* Makefile.in, awkscan-ip, awkscan-p, intobfd,
	libbfd.h, libcoff.h, tolibcoff; new bfd-in.h, libbfd-in.h,
	libcoff-in.h: (a) use separate files for invariant parts of bfd.h,
	libbfd.h, and libcoff.h; (b) in generated parts of same, use less
	obtrusive marks indicating .c origins.

	* bfd.texinfo: generalize most references to linker
1991-08-21 21:37:39 +00:00
Roland Pesch
a92b9db33c Tue Aug 20 15:18:02 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
* Makefile.in: include core.p in PROTOS (building better bfd.h)
	* archures.c: remove empty foo() definition (crept in at vn1.9)
1991-08-20 22:23:49 +00:00
Roland Pesch
188d6d224e Fixed minor typos. 1991-08-19 23:03:12 +00:00
Roland Pesch
6724ff46c8 Mon Aug 19 13:48:22 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
* aoutx.h, archive.c, archures.c, bfd.c, bfd.texinfo, cache.c,
	coffcode.h, core.c, format.c, libbfd.c, libbfd.h, libcoff.h,
	opncls.c, reloc.c, section.c, syms.c, targets.c (documentation
	segments): used BFD (caps) more consistently as a name in
	discourse, fixed a few other minor typos and uses of fonts
1991-08-19 20:52:38 +00:00
Steve Chamberlain
c618de01c1 Documentation 1991-08-17 00:17:15 +00:00
John Gilmore
3c8a3c56e4 * all files: update copyright notices for GPL version 2.
Install header comments and attribute most modules to their
	authors.  BFD's name is now officially "Binary File Descriptor",
	so remove any conflicting perjoratives.
1991-07-31 16:58:05 +00:00
Steve Chamberlain
87059abb6b *** empty log message *** 1991-07-27 01:14:16 +00:00
Steve Chamberlain
7a276b09e5 *** empty log message *** 1991-07-04 16:56:17 +00:00
Sean Eric Fagan
2099685bad Added code to deal with filenames less than 9 characters in a COFF file. 1991-06-07 19:37:42 +00:00