Is it possible to view all the functions exported by a given object file?
"dump -tv" comes the closest, but what exactly am I looking for to determine whether the symbol exists in the object file?
Essentially, I have a library that requires a call to "xdr_sizeof" and the compile is failing because the linker can not find it. I am curious if I can find where (and if) this function is provided so I can link it in. I have ran the following under /usr/lib:
for i in `find . -name "*.a"`
do
cnt=`dump -tv $i | grep -c xdr_sizeof`
if [ $cnt -ne 0 ]
then
echo $i " " $cnt
fi
done
How do I know which of those, if any, actually contains the xdr_sizeof function I want? Is there a better way to do the dump to limit it only to outputing lines for functions exported by the library? Am I completely off base here? I know the function can not be in four different libraries...or it shouldn't be....
I guess I can give it a shot.... Google is not much help telling much what the heck that library is for, however. If I had to venture a guess, I'd say "network sockets layer".... Sounds good :-).
The extern makes me wonder.... Sounds, however, like there is neither a "good" way to flag nm nor dump to show just functions provided by the library/archive.
-- DreamWarrior
P.S. mah: It seems that objdump and readelf are not available to me on AIX.