Re: [linux-audio-dev] dynamic linking

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] dynamic linking
From: Kai Vehmanen (kai.vehmanen_AT_wakkanet.fi)
Date: Wed Apr 24 2002 - 10:19:53 EEST


On Wed, 24 Apr 2002, Martijn Sipkema wrote:

>> I link with "ld -shared -Bsymbolic -lc -lm -o $@", but YMMV.
> I did that, but when linking with the alsa library from within the plugin,
> alsa only works when I load the plugin with RTLD_GLOBAL, and I would
> like to know why.

If you don't specify RTLD_GLOBAL when loading your plugin, the libasound
symbols are not made globally available to other dl_open()'ed modules.
Specifically, they are not available to routines dynamically loaded by
libasound (in snd_pcm_open()). Thus, loading your plugin succeeds, but
libasound fails to load its own plugins.

-- 
 http://www.eca.cx
 Audio software for Linux!


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Apr 24 2002 - 10:17:19 EEST