bfd function to read ELF file image from memory

Hans-Peter Nilsson hp@bitrange.com
Mon May 19 22:34:00 GMT 2003


On Mon, 19 May 2003, Roland McGrath wrote:
> My patch implements copying from remote memory once, not generalized access
> to it.  Lazy reading would be pretty straightforward to implement.  But it
> is rather a digression from the motivating purpose here.  The case at hand
> is an ELF file image of about 2kb, so it would surely be more overhead to
> split it up and access memory piecemeal than just to read the whole thing.
> Moreover, I have a problem to solve in gdb and the BFD function I've
> written is the naturally clean and somewhat general BFD component of it.
> It's pretty trivial to implement because of the existing BFD_IN_MEMORY
> functionality.  I have no impetus to add a more complex BFD facility for
> which there is no actual demand, and everyone's time is probably better
> spent elsewhere.  (All that said, what you've described is a few hours'
> hacking on bfdio.c--much more time writing something using such a facility
> so as to test it.)

At first sight (reading the subject) I thought this
functionality was intended for ksymoops, which has a similar
need.  That need was covered by what I perceived as a hack last
time I looked (2.4.2:ish), constructing a small file for any
oops code bits to be disassembled.  Nobody mentioned it (IIRC)
so I thought I should at least bring it up.  I haven't analyzed
how well this covers its need, though.  (Someone?) Just curious,
I don't want to put it on anyone's plate (well, no mine at
least. ;-)

brgds, H-P



More information about the Binutils mailing list