Subject: Re: dlopen problems
To: None <port-vax@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: port-vax
Date: 07/16/2001 23:01:25
In article <Pine.NEB.4.33.0107170024590.29119-100000@hogrelius.nu>,
Anders Hogrelius <ahs@hogrelius.nu> wrote:
>
>I'm trying to port a linux program that uses dlopen/dlsym to access
>functions in a shared object. Unfortunately it crashes with a segfault
>when any of the functions in the so is called. I tried to compile a
>example, and found out that it crashes too... :-(
>Is there something that is missing in the documentation that is needed
>to make the program work? It seems that the address of the function that
>is returned by dlsym isn't correct, and that the wrong address is the
>culprit. I'm running NetBSD 1.5 on this box. I have attached the code in
>the example. On linux the program should be compiled with -ldl, but the
>NetBSD manpage states that these functions automatically are included when
>a program is dynamically linked.
>
>Any ideas?

Which line does it die on? Compile it with -g and run it through gdb.

christos