[wip] BFD from an arbitrary object; Was: provide pass-through value in bfd_elf_bfd_from_remote_memory

Andrew Cagney cagney@gnu.org
Sat Feb 14 02:00:00 GMT 2004


> 
> IMHO the right way to do it is to define a "base class" struct, with
> only common elements (starting with int length and struct ops*), and
> let the I/O module create a derived structure with extra fields if it
> needs it.  I don't like the "void *cookie" solution because (1) you
> get an additional pointer dereferencing cost, and (2) you get an extra
> set of malloc/free overhead.

Note that it is:

+.  struct bfd_file stream;

and not:

+.  struct bfd_file *stream;

however, what ever.

Andrew




More information about the Binutils mailing list