diff options
author | Steve Chamberlain <steve@cygnus> | 1991-10-11 19:44:01 +0000 |
---|---|---|
committer | Steve Chamberlain <steve@cygnus> | 1991-10-11 19:44:01 +0000 |
commit | 0c210c9c52e56eda3e50aafbf5517abb538d7132 (patch) | |
tree | 33185d00fde16e9d93b63cdcbc1efdedf298dd39 /include | |
parent | 0d740984208c34b7a2a2a203f620662346794679 (diff) | |
download | gdb-0c210c9c52e56eda3e50aafbf5517abb538d7132.zip gdb-0c210c9c52e56eda3e50aafbf5517abb538d7132.tar.gz gdb-0c210c9c52e56eda3e50aafbf5517abb538d7132.tar.bz2 |
* bfd.h:upgrade from bfd.c
* internalcoff.h: add n_name, n_zeroes and n_offset macros
* amdcoff.h: Define OMAGIC and AOUTHDRSZ.
Diffstat (limited to 'include')
-rw-r--r-- | include/bfd.h | 75 | ||||
-rwxr-xr-x | include/coff-a29k.h | 4 | ||||
-rwxr-xr-x | include/internalcoff.h | 6 |
3 files changed, 79 insertions, 6 deletions
diff --git a/include/bfd.h b/include/bfd.h index 1b93389..3829d77 100644 --- a/include/bfd.h +++ b/include/bfd.h @@ -177,8 +177,6 @@ typedef struct lineno_cache_entry { /* object and core file sections */ -/* Align an address upward to a power of two. Argument is the power - of two, e.g. 8-byte alignment uses argument of 3 (8 == 2^3). */ #define align_power(addr, align) \ ( ((addr) + ((1<<(align))-1)) & (-1 << (align))) @@ -271,7 +269,14 @@ CAT(NAME,_bfd_debug_info_start),\ CAT(NAME,_bfd_debug_info_end),\ CAT(NAME,_bfd_debug_info_accumulate) -#define COFF_SWAP_TABLE coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in, +#define COFF_SWAP_TABLE \ + coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in, \ + coff_swap_aux_out, coff_swap_sym_out, \ + coff_swap_lineno_out, coff_swap_reloc_out, \ + coff_swap_filehdr_out, coff_swap_aouthdr_out, \ + coff_swap_scnhdr_out + + /* User program access to BFD facilities */ @@ -1827,6 +1832,27 @@ before); else determine modify time, cache it, and return it. #define bfd_set_arch_mach(abfd, arch, mach)\ BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) +#define bfd_coff_swap_reloc_out(abfd, i, o) \ + BFD_SEND (abfd, _bfd_coff_swap_reloc_out, (abfd, i, o)) + +#define bfd_coff_swap_lineno_out(abfd, i, o) \ + BFD_SEND (abfd, _bfd_coff_swap_lineno_out, (abfd, i, o)) + +#define bfd_coff_swap_aux_out(abfd, i, t,c,o) \ + BFD_SEND (abfd, _bfd_coff_swap_aux_out, (abfd, i,t,c, o)) + +#define bfd_coff_swap_sym_out(abfd, i,o) \ + BFD_SEND (abfd, _bfd_coff_swap_sym_out, (abfd, i, o)) + +#define bfd_coff_swap_scnhdr_out(abfd, i,o) \ + BFD_SEND (abfd, _bfd_coff_swap_scnhdr_out, (abfd, i, o)) + +#define bfd_coff_swap_filehdr_out(abfd, i,o) \ + BFD_SEND (abfd, _bfd_coff_swap_filehdr_out, (abfd, i, o)) + +#define bfd_coff_swap_aouthdr_out(abfd, i,o) \ + BFD_SEND (abfd, _bfd_coff_swap_aouthdr_out, (abfd, i, o)) + /* */ @@ -1903,7 +1929,7 @@ or else @code{false}. /*:targets.c*/ /* bfd_target -@node bfd_target +@node bfd_target, , Targets, Targets @subsection bfd_target This structure contains everything that BFD knows about a target. It includes things like its byte order, name, what routines to call @@ -2151,6 +2177,47 @@ Special entry points for gdb to swap in coff symbol table parts PTR ext, PTR in)); +/* +Special entry points for gas to swap coff parts +*/ + + SDEF(unsigned int, _bfd_coff_swap_aux_out,( + bfd *abfd, + PTR in, + int type, + int class, + PTR ext)); + + SDEF(unsigned int, _bfd_coff_swap_sym_out,( + bfd *abfd, + PTR in, + PTR ext)); + + SDEF(unsigned int, _bfd_coff_swap_lineno_out,( + bfd *abfd, + PTR in, + PTR ext)); + + SDEF(unsigned int, _bfd_coff_swap_reloc_out,( + bfd *abfd, + PTR src, + PTR dst)); + + SDEF(unsigned int, _bfd_coff_swap_filehdr_out,( + bfd *abfd, + PTR in, + PTR out)); + + SDEF(unsigned int, _bfd_coff_swap_aouthdr_out,( + bfd *abfd, + PTR in, + PTR out)); + + SDEF(unsigned int, _bfd_coff_swap_scnhdr_out,( + bfd *abfd, + PTR in, + PTR out)); + } bfd_target; /* diff --git a/include/coff-a29k.h b/include/coff-a29k.h index 46c131d..8042d51 100755 --- a/include/coff-a29k.h +++ b/include/coff-a29k.h @@ -36,12 +36,13 @@ struct external_filehdr #define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB) */ #define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB) */ + #define A29K_MAGIC_BIG SIPFBOMAGIC #define A29K_MAGIC_LITTLE SIPRBOMAGIC #define A29KBADMAG(x) (((x).f_magic!=A29K_MAGIC_BIG) && \ ((x).f_magic!=A29K_MAGIC_LITTLE)) - +#define OMAGIC A29K_MAGIC_BIG /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /* @@ -70,6 +71,7 @@ typedef struct external_aouthdr } AOUTHDR; #define AOUTSZ (sizeof(AOUTHDR)) +#define AOUTHDRSZ (sizeof(AOUTHDR)) /* aouthdr magic numbers */ #define NMAGIC 0410 /* separate i/d executable */ diff --git a/include/internalcoff.h b/include/internalcoff.h index 1cfd0d4..ffd497d 100755 --- a/include/internalcoff.h +++ b/include/internalcoff.h @@ -174,6 +174,10 @@ struct internal_syment { char n_sclass; /* storage class */ char n_numaux; /* number of aux. entries */ }; +#define n_name _n._n_name +#define n_zeroes _n._n_n._n_zeroes +#define n_offset _n._n_n._n_offset + /* Relocatable symbols have number of the section in which they are defined, or one of the following: */ @@ -225,11 +229,11 @@ struct internal_syment { union internal_auxent { struct { + union { long l; /* str, un, or enum tag indx */ struct coff_ptr_struct *p; } x_tagndx; - union { struct { unsigned short x_lnno; /* declaration line number */ |