* bfd.h:upgrade from bfd.c
* internalcoff.h: add n_name, n_zeroes and n_offset macros * amdcoff.h: Define OMAGIC and AOUTHDRSZ.
This commit is contained in:
parent
0d74098420
commit
0c210c9c52
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user