Subject: Re: dlopen'ing a plugin that calls functions in the parent...
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Jasper Wallace <jasper@pointless.net>
List: netbsd-users
Date: 09/05/2001 23:11:26
-----BEGIN PGP SIGNED MESSAGE-----

On Wed, 5 Sep 2001, Jason R Thorpe wrote:

> On Wed, Sep 05, 2001 at 09:55:06PM +0100, Jasper Wallace wrote:
>
>  > I'm trying to get the wirless plugin[1] for gkrellm[2] to work under
>  > NetBSD 1.5.2.
>  >
>  > After digging around with gdb the call to dlopen() on the plugin fails with
>  > (as reported dy dlerror()):
>  >
>  > Error: /usr/home/jasper/.gkrellm/plugins/wireless.so: Undefined PLT symbol
>  > "gkrellm_draw_decal_text" (reloc type = 7, symnum = 31)
>  >
>  > gkrellm_draw_decal_text is a function in gkrellm (and gkrellm is NOT
>  > striped).
>
> gkrellm needs to be linked with the -E (--export-dyanmic) option.  That
> should fix your problem.

yey! that did it. thanks.

> Any program which opens a shared object that needs to call back into
> the parent needs this option.  I guess maybe it's the default on Linux,
> or something, because lots of programs fail to include it in their
> Makefiles.

- -- 
When Ted's fixing your computer at a quarter past one, eat your
Whopper  with cheese in his face. He functions better when he's
slightly dizzy from hunger.
[see: http://sysday.tripod.com/time.htm]           [0x2ECA0975]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org

iQEVAwUBO5ajEQCB+Qwuygl1AQGJnAf+IsU037Cl/9J3V5ufzpc5GqpInXp5tGsu
zeAVs1ook06FEG7aJ1gl6jp9pvpn0GCKguP9v7YUkEi7iwr0gme7qE+15nXtVg7f
f07Hby5cjDEgnyncDC69ElGBjnpJfjxHcN066QI/g9ieZ0CIdbHAd3r2FsndcFS3
ADOzTmd69V7opvU7HHkb84Ypvnn6VsO/m5wkgKkdN1GXd+yZdOeVyQlY/nHZBvoJ
VvgLvzgJNjtoNMZJw8hi7v09yRsLjQ3oOB2hDlOVp1NfS56INRBLg8IXrBRW9Dd+
a/nkGMf8MNz9Tct/WEi4MmqeKQK0/6oC4TpvjhAeqXhPHg0yTV8smw==
=kK9B
-----END PGP SIGNATURE-----