Fix for coffcode.h
Mark E.
snowball3@bigfoot.com
Sat Apr 14 21:13:00 GMT 2001
> Are you sure this is a bug? coff_* may be a #define set according to
> the file including coffcode.h, whereas bfd_coff_* may point somewhere
> else entirely. Or perhaps it's an optimization. Is there a specific
> case failing because of the way it is?
Nothing in CVS. I was experimenting with coff-djgpp.c that combined coff-
go32.c and coff-stgo32.c into one file to save space and make some needed
changes. To do that, I had to create one swap table for "coff-go32" that ends
up getting defined in coffcode.h and another for "coff-go32-exe" that was
defined in coff-djgpp.c (the different file header sizes made this
neccessary). The "coff-go32-exe" swap table contained custom file header
functions to handle the exe stub. Here's the first part of the declaration:
static const bfd_coff_backend_data djgpp_stubbed_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,
djgpp_swap_filehdr_out, coff_SWAP_aouthdr_out,
djgpp_swap_filehdr_out was never called because coff_swap_filehdr_out is
called directly in coffcode.h. After I changed coff_swap_filehdr_out to
bfd_coff_swap_filehdr_out, djgpp_swap_filehdr_out did then get called.
Mark
More information about the Binutils
mailing list