[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

dlsym() broken on alpha?



Is dlsym() broken on RedHat 5.1 Linux/Alpha.  I believe I've got the latest
glibc (2.0.7-19) installed, and am using egcs 1.0.3.  When I compile the
following piece of code straight from the dlsym() man page, I get a
segmentation fault:

#include <dlfcn.h>

int main(int argc, char **argv) {
    void *handle = dlopen ("/lib/libm.so", RTLD_LAZY);
    double (*cosine)(double) = dlsym(handle, "cos");
    printf ("%f\n", (*cosine)(2.0));
    dlclose(handle);
}

Is this a known issue?

Thanks,
Eric
-- 
Software Development Engineer / ericding@applix.com               <><
Applix, Inc. / 112 Turnpike Road / Westboro MA 01581-2842



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []