Retreiving dynamic links through BFD

Ian Lance Taylor ian@airs.com
Thu Jul 1 00:00:00 GMT 1999


   Date: Sun, 23 May 1999 20:39:45 -0700
   From: Jeff Bailey <jbailey@nisa.net>

   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.

BFD isn't a general ELF reading library.  The dynamic information in
an ELF executable or shared library is ELF specific.  I'm not aware of
any other object file format with anything comparable.

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.

You could also use libelf.

Ian


More information about the Binutils mailing list