Retreiving dynamic links through BFD

Jeff Bailey jbailey@nisa.net
Thu Jul 1 00:00:00 GMT 1999


On Mon, May 24, 1999 at 12:09:14AM -0400, Ian Lance Taylor wrote:
>    I'm trying to find a way to list the library dependancies of an 
>    executable.  Unfortunetly this information seems to be only located in 
>    the private-headers section (viewable through objdump -p).  elf.c defines 
>    the list of them through DT_NEEDED, and peicode.h shows the list of dll's 
>    using bfd_get_32 calls.  Is there any abstraction layer that will provide 
>    this information?
> 
> Not in BFD.
>
> I suppose one could make a generic routine which somehow returned a
> list of required shared libraries.  I wouldn't be averse to such a
> patch.

I'm trying to decide if I feel brave enough to attempt this. =)  Are you 
thinking of something to the effect of:

void bfd_fetch_shared_libs (bfd *, char **);

This would put a pointer to an array of NULL-terminated strings in the 
second argument.

Tks,
Jeff Bailey

-- 
I'm not a vegetarian because I love animals, I'm a vegetarian
because I hate plants.


More information about the Binutils mailing list