This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Question about libbfd
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Filippos Papadopoulos <csst9923 at cs dot uoi dot gr>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 5 May 2003 19:52:28 -0400
- Subject: Re: Question about libbfd
- References: <Pine.GSO.4.44.0305060036270.9713-100000@io.cs.uoi.gr>
On Tue, May 06, 2003 at 12:57:36AM +0300, Filippos Papadopoulos wrote:
>
> Hi.
>
> I am making a small application for the autopackage project
> (http://autopackage.org) that lists library dependencies of a Linux ELF
> binary/library recursively. The problem is that i use the command
> "objdump -p /usr/bin/foobar | grep NEEDED" to get the 'NEEDED' entries.
> Since i 'call the shell' from C code to execute that command, i have
> problems with resources and execution speed. I believe that there must be
> a way to get the 'NEEDED' entries by using libbfd. Unfortunately i found
> poor documentation about libbfd (or at least this is my perception :)
> I would be thankful if you provide me some info on how to get the
> 'NEEDED' entries using C and libbdf.
For something like this, I heartily recommend using libelf instead.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer