This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Trying to use libbfd to lookup symbol offset in PE/COFF (Windows) library.


Hi, I apologize if this should have been obvious to me, but I'd like
to use libbfd to take a library symbol and get the symbol offset in
return, specifically using Windows PE/COFF libraries.  I've had a hard
time finding any function that promises to do this or something
similar, but I know that the capability is there, because I'm not
asking for any information you can't get from objdump -x.

So my first question is, is there a function or function(s) in the
libbfd front-end that will get me this information?

My second question, is, assuming the answer is no, I'd like to add a
function that does this to my local copy of libbfd, using the
functionality laid out in pe_print_adata() (peXXigen.c:~1362).
However, I'm having a very hard time adding new functions to libbfd,
as the headers seem to be automatically generated from the source, but
the automatic generation script seems to be intent on ignoring any
functions I add.  I can't figure out how it is specified for the other
functions in the library to end up in the automatically generated
headers.  Can anyone give me a hint as to how this is accomplished?

Thanks for your help.
-Zac Salwasser


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]