[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/7] audio: modularize
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 0/7] audio: modularize |
Date: |
Tue, 6 Mar 2018 16:28:58 +0100 |
Hi
On Tue, Mar 6, 2018 at 2:27 PM, Gerd Hoffmann <address@hidden> wrote:
>> >> /home/elmarco/src/qemu/build/x86_64-softmmu/../audio-pa.so: undefined
>> >> symbol: audio_pt_unlock_and_signal
>
>> Fresh directory, cleaned ccache. That didn't help. fwiw, I am
>> compiling on f27, gcc (GCC) 7.3.1 20180130. I'll investigate further
>> if you can't reproduce.
>
> Hmm, working fine here (both rhel-7 and fedora-27 testbuild container, default
> build flags).
>
> The symbol in question should be provided by qemu:
>
> address@hidden ~/projects/qemu/build/fedora# objdump -x audio-pa.so | grep
> audio_pt_unlock_and_signal
> 0000000000000000 *UND* 0000000000000000
> audio_pt_unlock_and_signal
> address@hidden ~/projects/qemu/build/fedora# objdump -x
> x86_64-softmmu/qemu-system-x86_64 | grep audio_pt_unlock_and_signal
> 00000000004735f0 g F .text 0000000000000067
> audio_pt_unlock_and_signal
>
> Possibly your linker throws it away, thinking there is no user because of the
> modular drivers?
It's not that, but it works if I build qemu with -rdynamic. dlopen(3):
External references in the shared object are resolved using the
shared objects in that object's dependency list and any other objects
previously opened with the RTLD_GLOBAL flag. If the executable
was linked with the flag "-rdynamic" (or, synonymously,
"--export-dynamic"), then the global symbols in the executable will
also be used to resolve references in a dynamically loaded shared
object.
(If I understand right, there is some magic rules.mk
process-archive-undefs to make sure the used symbols from modules are
always linked in)
Could it be that -rdynamic / --export-dynamic is assumed in our build
system since modules have been added?
yes, it's pulled from /usr/lib64/pkgconfig/gmodule-2.0.pc, but glib
upstream built with meson doesn't have the flag anymore. That's
probably worth fixing in glib:
https://bugzilla.gnome.org/show_bug.cgi?id=794123
We should switch to using gmodule-export-2.0.pc (since 2.6), which is
also broken in meson build. I'll send a patch for that.
--
Marc-André Lureau
- [Qemu-devel] [PATCH 4/7] audio/alsa: build as module, (continued)
- [Qemu-devel] [PATCH 4/7] audio/alsa: build as module, Gerd Hoffmann, 2018/03/06
- [Qemu-devel] [PATCH 2/7] audio: add module loading support, Gerd Hoffmann, 2018/03/06
- [Qemu-devel] [PATCH 1/7] audio: add driver registry, Gerd Hoffmann, 2018/03/06
- [Qemu-devel] [PATCH 3/7] build: enable audio modules, Gerd Hoffmann, 2018/03/06
- Re: [Qemu-devel] [PATCH 0/7] audio: modularize, Marc-André Lureau, 2018/03/06