This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: about libbfd
- From: Alan Modra <amodra at gmail dot com>
- To: hongming li <hongmingli1988 at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 21 Sep 2010 09:35:43 +0930
- Subject: Re: about libbfd
- References: <AANLkTimD_Y5uieZX=OCDvbev_wzrEeUQ-Z5QThaUr+XO@mail.gmail.com>
On Mon, Sep 20, 2010 at 02:27:57PM +0800, hongming li wrote:
> can you help me.just a simple question. I have use libbfd to analyse a
> object file.
> i initialize a bfd pointer by call bfd_openr(path,NULL)
> now i want analyse a buffer in memory which contains a object file , that
> means if there exsit such a method bfd_init_by_buffer(void* , size_t size)
> to initialize a bfd pointer
You may be able to use _bfd_elf_bfd_from_remote_memory, depending on
your target. If not, then you'll need to write some code yourself.
grep for BFD_IN_MEMORY in the binutils sources.
--
Alan Modra
Australia Development Lab, IBM