[libvirt] libvirt library binary name for linux

arnaud.champion at devatom.fr arnaud.champion at devatom.fr
Tue Oct 19 13:13:00 UTC 2010


?Well, as I have said I work on .Net/Mono bindings.

To make bindings, we use largely the marshaling methods of .Net/Mono. I was 
working on bindings virConnectOpenAuth, so I have de marshal 
virConnectCredential struct, these kind of thing. Matthias Bolte help me a 
lot to make all the process thru callback working. And we have discover that 
the virConnectCredential was reseted by the marshaling process (in 
particular marshaling process free the result member of the 
virConnectCredential, and in fact, for libvirt, it's the driver 
responsability to free the result member). So Matthias suggest me to bind 
strdup to .Net and use it to be sure that the result member is not freed by 
marshaling. And it works. I know, it is not very elegant, and right now I'm 
working on another possible solution thru custom marshaling (I hope it will 
work). Anyway, As I plan to make bindings works for Mono and .Net, I have 
made some tests with Mono/Windows Mono/Linux and .Net/Windows. And all seems 
to work fine, I have made a sample application that connect to a ESX 
hypervisor and list domains and it works fine, thanks for your help.

As you can see, I'm not a linux expert, and ldd and nm tools can help me to 
find things, so thanks for these infos.

Arnaud

PS : really sorry for my english, I hope I'm clear let me know anyway


--------------------------------------------------
From: "Justin Clift" <jclift at redhat.com>
Sent: Tuesday, October 19, 2010 2:53 PM
To: <arnaud.champion at devatom.fr>
Cc: "Eric Blake" <eblake at redhat.com>; <libvir-list at redhat.com>
Subject: Re: [libvirt] libvirt library binary name for linux

> On 10/19/2010 11:25 PM, arnaud.champion at devatom.fr wrote:
>> ?I have tried libc.so and it doesn't contains _strdup, amybe it's strdup
>> instead I will try. Anyway I have a little question (a windowsian
>> question :) ). Under windows I have a tool named "depends.exe" with it,
>> I can sse what is exposed thru a dll, is there any equivalent under linux 
>> ?
>
> Hmmm, two tools might be useful, but I don't personally know them in
> much depth:
>
>  + ldd
>  + nm
>
> ldd can be used on an executable file, to show which dynamic libraries
> that file needs.  For example, if I have the program "/bin/bash":
>
>   $ ldd /bin/bash
>           linux-vdso.so.1 =>  (0x00007fff999ff000)
>           libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00000030cd600000)
>           libdl.so.2 => /lib64/libdl.so.2 (0x00000030bc200000)
>           libc.so.6 => /lib64/libc.so.6 (0x00000030bba00000)
>           /lib64/ld-linux-x86-64.so.2 (0x00000030bb600000)
>
> The "nm" program, can be used on a dynamic library to show which
> symbols it provides.  For example, on /lib64/libc.so.6:
>
>   $ nm /lib64/libc.so.6
>   <snip>
>   00000030bbd7ba60 B __daylight
>   00000030bba2c550 T __dcgettext
>   00000030bba2c550 t __dcgettext_internal
>   00000030bba2d5e0 t __dcigettext
>   00000030bba2dfc0 t __dcngettext
>   00000030bba7c600 T __default_morecore
>   00000030bba33140 t __default_sigpause
>   00000030bba2c560 T __dgettext
>   00000030bba95be0 t __difftime
>   00000030bbb1e7c0 t __dl_iterate_phdr
>   00000030bba2dfd0 t __dngettext
>   00000030bba4f150 t __dprintf
>   <snip - it is a long list>
>
> Both nm and ldd can be given options, which change what they display.
>
> Looking at the questions you are asking, they are a bit unusual.
>
> There is nothing _wrong_ with your questions, but they make me curious
> what you are trying to do.  If you are ok to explain the idea you are
> trying, we might know of a better or easier way.  (no guarantees
> though!)  :)
>
> Regards and best wishes,
>
> Justin Clift
>
>
>
>> Arnaud
>
> 




More information about the libvir-list mailing list