This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [rfa] Add bfd_runtime
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 29 Jun 2004 22:08:15 -0400
- Subject: Re: [rfa] Add bfd_runtime
- References: <40E1FF7A.10405@redhat.com>
Andrew Cagney <ac131313@redhat.com> writes:
> This follows up an earlier thread by adding the bfd_format type
> bfd_runtime. It just pads out all the architecture vectors, not doing
> anything useful.
I'm sorry, I completely misunderstood what you were talking about
earlier. I don't see why this is the right approach. The fact that
file contents are stored in memory does not make that file any
different from a file stored on disk. It is presumably still an
object file, and the contents of the file are presumably still
organized like an object file. It seems to me that the format should
be bfd_object.
Thinking in terms of adding support for a new object file format to
BFD, what would the entries for bfd_runtime be? How can you recognize
a file as bfd_runtime rather than bfd_object? The concept of
bfd_runtime seems to me to be orthogonal to the concept of bfd_format.
I didn't read your earlier e-mail messages closely, and I thought that
what you were going to do was add a new iovec type. That makes sense
to me. I don't see why you need anything else.
If your only concern is to avoid requiring an ELF specific routine in
BFD, then the usual BFD approach is shown by bfd_get_gp_size() and
similar functions. Those functions check the flavour, and then call
the appropriate backend routine.
Ian