qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I wanna fixes plugin on windows, any suggestion


From: Yonggang Luo
Subject: Re: I wanna fixes plugin on windows, any suggestion
Date: Sat, 26 Sep 2020 06:04:57 +0800



On Sat, Sep 26, 2020 at 4:59 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 25/09/20 22:50, Richard Henderson wrote:
> > On 9/25/20 12:25 PM, Paolo Bonzini wrote:
> >> On 25/09/20 21:23, 罗勇刚(Yonggang Luo) wrote:
> >>> That's what I am tring to fixes? what does  one import library per
> >>> emulator, can we do this like NodeJS does?
> >>>  NodeJS have NAPI support across platform. They create a windows .lib from
> >>> node.exe
> >>
> >> You'd have to create a .lib for qemu-system-aarch64.exe, one for
> >> qemu-system-arm.exe, etc.  On Linux the same plugin will work for all
> >> emulators.
> >
> > Which is clearly silly.
> >
> > So what you'd do is create a common .lib that all of the plugins link to, and
> > so do all of the qemu-foo.exe.
> >
> > This would probably involve creating a set of call-backs that qemu-foo.exe
> > would need to pass to the common .lib at startup.  It's harder to do with
> > windows than linux, but it's not impossible.
>
> Yes, or you can skip the .lib/.dll completely; you just place pointers
> to the callbacks in a struct and pass it to the plugin when it's loaded,
> through qemu_info_t.
I also got another idea to resolve this issue by loading these API by dl_sym(NULL, "qemu_plug_api_function_name"),
so we won't change any current API. And creating a plugin_api.lib for static linkage to(only for windows).
>
> Paolo
>


--
         此致

罗勇刚
Yours
    sincerely,
Yonggang Luo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]