* archures.c: Reindent many functions. Change CONST to const.
(bfd_arch_info_type): Make arch_name const. Remove disassemble;
nothing set it anyhow. Make next const.
(bfd_arch_info_list): Remove.
(bfd_archures_list): Rename from archures_init_table. Change from
a table of function pointers to a table of bfd_arch_info_type
structure addresses.
(bfd_scan_arch): Rewrite accordingly. Return a const pointer.
(bfd_lookup_arch): Likewise.
(bfd_set_arch_info): Rewrite accordingly. Change argument to be a
const pointer.
(bfd_default_arch_struct): Make const.
(bfd_arch_init, bfd_arch_linkin): Remove.
(bfd_get_arch_info): Return a const pointer.
* init.c (bfd_init): Don't call bfd_arch_init.
* bfd.c (struct _bfd): Make arch_info const.
* bfd-in2.h: Rebuild.
* libbfd.h: Rebuild.
* configure.in: Put & before everything in $selarchs.
* configure: Rebuild.
* cpu-*.c: Change bfd_*_arch from a function which calls
bfd_arch_linkin to a const structure.
* ieee.c (ieee_object_p): Make arch const.
HOST_64BIT_LONG. Check that various header files exist. Check
that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
and/or free need to be declared. Don't make a link to sysdep.h.
Define TRAD_HEADER for various hosts.
* configure: Rebuild.
* configure.host: Don't set my_host. Add definitions taken from
host header files for various entries. Remove entries which now
do nothing.
* acconfig.h: New file.
* config.h.in: New file, built by autoheader.
* sysdep.h: New file.
* Makefile.in (do_distclean): Don't remove sysdep.h.
(RECONFIG): Remove.
(LOCAL_H_DEPS): New variable.
($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
$(RECONFIG).
($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
($(OPTIONAL_BACKENDS)): Likewise.
(stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
looking through sysdep.h.
* bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
(BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
(fprintf_vma, sprintf_vma): Likewise.
(int64_type, uint64_type): Don't define.
* bfd-in2.h: Rebuild.
* archures.c, bfd.c, srec.c: Include <ctype.h>.
* elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
* lynx-core.c: Include stuff from old hosts/lynx.h.
* opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
rather than NO_FCNTL.
* targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
rather than NATIVE_HPPAHPUX_COMPILER.
* trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
is defined.
* hosts/*.h: Remove all header files which merely include,
declare, and define things. Leave header files which define
information needed by trad-core.c.
(bfd_errmsgs): Add string for bfd_error_no_armap.
* bfd-in2.h: Rebuild.
* ecoff.c (ecoff_link_add_archive_symbols): If an archive has no
armap, set bfd_error_no_armap rather than bfd_error_no_symbols.
* elfcode.h (elf_link_add_archive_symbols): Likewise.
* linker.c (_bfd_generic_link_add_archive_symbols): Likewise.
objdump -r.
* coffswap.h: Added macros used when accessing several fields;
default is the same as before.
(coff_swap_aouthdr_{in,out}): Handle the Alpha ECOFF fields.
* coff-alpha.c: Defined macros to use the right sizes in
coffswap.h.
* libecoff.h: Backend information is now in target vector, not
BFD. Start of backend information is COFF backend information.
* coff-alpha.c, coff-mips.c: Changed accordingly.
* ecoff.c (ecoff_mkobject): New function.
(ARMAP_START): Changed into backend information, since Alpha uses
a different name.
(ecoff_slurp_armap): Don't overlay archive header.
* bfd.c: Include libcoff.h.
* ecoffswap.h: New file for ECOFF swapping functions which differ
only slightly for different targets.
* libecoff.h: Added prototypes for ecoff.c functions.
(ecoff_backend_data): New structure.
(ecoff_tdata): Added backend_data field. Changed external data
pointers to be PTR rather than to a particular struct.
(ecoff_symbol_struct): Moved in from coff-mips.c.
* coff-alpha.c, coff-mips.c: Moved common functions into ecoff.c.
Added ECOFF backend structures. Include ecoffswap.h.
* coff-msym.c: Removed; superseded by ecoffswap.h.
* bfd.c: Include coff/internal.h.
* Makefile.in (BFD_LIBS): Removed coff-mips.o and coff-msym.o.
Added ecoff.o.
(BFD64_BACKENDS): Added coff-alpha.o.
(CFILES): Removed coff-msym.c. Added ecoff.c.
(bfd.o): Added dependency on $(INCDIR)/coff/sym.h.
(coff-mips.o): Added dependency on ecoffswap.h and coff/ecoff.h.
(ecoff.o, coff-alpha.o): New targets.
(coff-msym.o): Removed target.
* bfd.c (struct _bfd): Renamed hppa_core_data field to
hpux_core_data.
* bfd-in2.h: Updated.
* hppa.c (make_bfd_asection, hppa_core_file_p,
hppa_core_file_failing_command, hppa_core_file_failing_signal,
hppa_core_file_matches_executable_p): Moved into hpux-core.c.
Removed from target vector.
* libhppa.h (struct hppa_core_struct and accessor macros): Moved
into hpux-core.c.
* targets.c: If HPUX_CORE is defined, add hpux_core_vec to
target list.
* config/hp300.mh (HDEFINES): Set to -DHPUX_CORE.
(HDEPFILES): Set to hpux-core.o.
* config/hppabsd.mh, config/hppahpux.mh: Likewise.
* hosts/hp300.h (HOST_HP300HPUX): Define.
* Makefile.in (OPTIONAL_BACKENDS): Added sco-core.o,
aix386-core.o, hpux-core.o.
(sco-core.o, aix386-core.o, hpux-core.o): New dependencies.
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.
* 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 '_'.
* 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
* 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
bfd.texinfo oasys.c opncls.c reloc.c srec.c: More documentation on
lint fixes.
* amdcoff.c bfd.texinfo Makefile.in : Folded in changes for amd
29k coff by David Wood (wood@lab.ultra.nyu.edu).
Remove obstack.h to ../include and obstack.c to ../libiberty.
Move COFF symbol swapping code to coffswap.c where GDB can call it but it
won't be duplicated if we have N different COFF targets.
Add support for traditional Unix core files (with a upage). This support
is from an Ultrix port, but is probably slightly broken now.
Improve bfd_release's of obstack'd items on error returns.
gcc -Wall fixes.
Handle section alignment slightly better in coff, and comment where it
needs more work (on page-aligning virtual vs file addresses for DPAGED).
Use set_tdata everywhere that tdata is set, to avoid "cast to the left
of assignment" problems with some compilers.
Move bfd_alloc, bfd_zalloc, bfd_realloc, and bfd_release into libbfd.h
(from bfd.h) since they are internal routines.
Remove the redundant suffix "_struct" from struct tags.
Set symbol count early in file reading, before slurping in the syms,
for GDB's use.