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!
