This is the mail archive of the
sid@sources.redhat.com
mailing list for the SID project.
Re: PATCH: fix up fake BFD functions in cgen-cpu/tracedis.cxx
- From: Jim Blandy <jimb at redhat dot com>
- To: sid at sources dot redhat dot com
- Date: 26 Mar 2004 15:24:01 -0500
- Subject: Re: PATCH: fix up fake BFD functions in cgen-cpu/tracedis.cxx
- References: <vt21xnjyx94.fsf@zenia.home>
I've committed this.
Jim Blandy <jimb@redhat.com> writes:
> In trying to build SID with --disable-shared, I found that linking
> 'sid' died because the references to these functions in libopcodes
> weren't being satisfied. As it turns out:
>
> $ nm tracedis.o | grep bfd_get_bits
> 000024de T _Z12bfd_get_bitsPhii
> $
>
> But when I added the 'extern "C"' thingies, the compiler was suddenly
> able to check the definitions against the declarations in bfd/bfd.h
> again. Those changed recently; see Alan Modra's 2004-03-15 change in
> bfd/ChangeLog.
>
> 2004-03-23 Jim Blandy <jimb@redhat.com>
>
> * tracedis.cxx (bfd_get_arch, bfd_getb16, bfd_getl16, bfd_getb32)
> (bfd_getl32, bfd_put_bits, bfd_get_bits, bfd_lookup_arch): These
> definitions are meant to satisfy references in libopcodes, which
> is C code, so declare these with 'extern "C"'. Adjust types to
> match those declared in the BFD header file.