This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: XCOFF64 bfd changes
Date: Fri, 7 Apr 2000 21:46:03 -0500
From: Clinton Popetz <cpopetz@cygnus.com>
> + #include "coff-rs6000.c"
>
> I don't like this approach. I know that BFD uses it a lot, for
> historical reasons. But this is another thing I'd rather we tried to
> avoid in new code.
>
> The way to do this is to use backend functions. I happen to like the
> ECOFF support, since I wrote pretty much all of it. We support two
> different kinds of ECOFF in different sizes without any bizarre file
> inclusion.
It isn't clear to me how I can reuse the code in coffcode.h without include
file weirdness, since coffcode.h knows about the coff structs directly. Do
you mean I should ignore coffcode.h and do a separate libxcoff.h/xcoff.c
modeled after ecoff.c? That would obviously be cleaner, but the presence
of coffcode.h, and the many of the coff backends use it, led me to believe
I should work within that framework.
No, that would be too much work. I'm encouraging you to not include
coff-rs6000.c. It's OK to include coffcode.h. Make whatever you need
from coff-rs6000.c globally visible (with a name that begins with
_bfd), and simply use it directly.
Ian