[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
bfd_swap
_thing_direction routines. Some
elements are different sizes between different versions of
coff; it is the duty of the coff version specific include file
to override the definitions of various packing routines in
`coffcode.h'. E.g., the size of line number entry in coff is
sometimes 16 bits, and sometimes 32 bits. #define
ing
PUT_LNSZ_LNNO
and GET_LNSZ_LNNO
will select the
correct one. No doubt, some day someone will find a version of
coff which has a varying field size not catered to at the
moment. To port BFD, that person will have to add more #defines
.
Three of the bit twiddling routines are exported to
gdb
; coff_swap_aux_in
, coff_swap_sym_in
and coff_swap_lineno_in
. GDB
reads the symbol
table on its own, but uses BFD to fix things up. More of the
bit twiddlers are exported for gas
;
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
. Gas
currently keeps track
of all the symbol table and reloc drudgery itself, thereby
saving the internal BFD overhead, but uses BFD to swap things
on the way out, making cross ports much safer. Doing so also
allows BFD (and thus the linker) to use the same header files
as gas
, which makes one avenue to disaster disappear.