forked from Imagelibrary/binutils-gdb
Insert the incidentals and things I forgot to ci last time, same log message:
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. * amdcoff.c: (a29k_reloc) fix error message. * 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.
This commit is contained in:
101
bfd/libbfd.h
101
bfd/libbfd.h
@@ -1,3 +1,4 @@
|
||||
|
||||
/* libbfd.h -- Declarations used by bfd library *implementation*.
|
||||
(This include file is not for users of the library.)
|
||||
Copyright (C) 1990-1991 Free Software Foundation, Inc.
|
||||
@@ -72,7 +73,7 @@ PROTO(PTR, bfd_alloc_finish,(bfd *abfd));
|
||||
|
||||
|
||||
PROTO (bfd_size_type, bfd_read, (PTR ptr, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
|
||||
PROTO (bfd_size_type, bfd_write, (PTR ptr, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
|
||||
PROTO (bfd_size_type, bfd_write, (CONST PTR ptr, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
|
||||
|
||||
|
||||
|
||||
@@ -179,22 +180,32 @@ extern bfd *bfd_last_cache;
|
||||
|
||||
/* THE FOLLOWING IS EXTRACTED FROM THE SOURCE*/
|
||||
|
||||
/* FROM libbfd.c*/
|
||||
/* ------------------------------START FROM libbfd.c
|
||||
/*:init.c*/
|
||||
/* bfd_check_init
|
||||
|
||||
*i bfd_log2
|
||||
This routine is called before any other bfd function using initialized
|
||||
data is used to ensure that the structures have been initialized.
|
||||
Soon this function will go away, and the bfd library will assume that
|
||||
bfd_init has been called.
|
||||
*/
|
||||
|
||||
void EXFUN(bfd_check_init,(void));
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
/*:libbfd.c*/
|
||||
/* *i bfd_log2
|
||||
Return the log base 2 of the value supplied, rounded up. eg an arg
|
||||
of 1025 would return 11.
|
||||
*/
|
||||
PROTO(bfd_vma, bfd_log2,(bfd_vma x));
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
--------------------------------END FROM libbfd.c*/
|
||||
|
||||
/* FROM cache.c*/
|
||||
/* ------------------------------START FROM cache.c
|
||||
BFD_CACHE_MAX_OPEN
|
||||
/*:cache.c*/
|
||||
/* BFD_CACHE_MAX_OPEN
|
||||
The maxiumum number of files which the cache will keep open at one
|
||||
time.
|
||||
*/
|
||||
@@ -258,8 +269,76 @@ one first, to avoid running out of file descriptors.
|
||||
PROTO(FILE *, bfd_cache_lookup_worker, (bfd *));
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
--------------------------------END FROM cache.c*/
|
||||
|
||||
/* FROM reloc.c*/
|
||||
/*:reloc.c*/
|
||||
|
||||
/*:cpu-h8300.c*/
|
||||
|
||||
/*:cpu-i960.c*/
|
||||
|
||||
/*:cpu-empty.c*/
|
||||
|
||||
/*:howto.c*/
|
||||
|
||||
/*:archures.c*/
|
||||
/* bfd_default_arch_struct
|
||||
|
||||
What bfds are seeded with
|
||||
*/
|
||||
|
||||
extern bfd_arch_info_struct_type bfd_default_arch_struct;
|
||||
|
||||
/*
|
||||
bfd_default_set_arch_mach
|
||||
|
||||
Set the architecture and machine type in a bfd. This finds the correct
|
||||
pointer to structure and inserts it into the arch_info pointer.
|
||||
*/
|
||||
|
||||
boolean EXFUN(bfd_default_set_arch_mach,(bfd *abfd,
|
||||
enum bfd_architecture arch,
|
||||
unsigned long mach));
|
||||
|
||||
/*
|
||||
|
||||
This routine initializes the architecture dispatch table by calling
|
||||
all installed architecture packages and getting them to poke around.
|
||||
*/
|
||||
|
||||
PROTO(void, bfd_arch_init,(void));
|
||||
|
||||
/*
|
||||
|
||||
bfd_arch_linkin
|
||||
|
||||
Link the provided arch info structure into the list
|
||||
*/
|
||||
|
||||
void EXFUN(bfd_arch_linkin,(bfd_arch_info_struct_type *));
|
||||
|
||||
/*
|
||||
|
||||
bfd_default_compatible
|
||||
|
||||
The default function for testing for compatibility
|
||||
*/
|
||||
|
||||
CONST bfd_arch_info_struct_type *EXFUN(bfd_default_compatible,
|
||||
(CONST bfd_arch_info_struct_type *a,
|
||||
CONST bfd_arch_info_struct_type *b));
|
||||
|
||||
/*
|
||||
|
||||
bfd_default_scan
|
||||
The default function for working out whether this is an architecture
|
||||
hit and a machine hit
|
||||
*/
|
||||
|
||||
boolean EXFUN(bfd_default_scan,(CONST struct bfd_arch_info_struct *, CONST char *));
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user