From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 3390 invoked from network); 5 Sep 1998 16:41:58 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 5 Sep 1998 16:41:58 -0000 Received: from norad.dodds.net (scorpio@norad.dodds.net [208.132.64.105]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA02465 for ; Sat, 5 Sep 1998 12:42:42 -0400 Received: from localhost (scorpio@localhost) by norad.dodds.net (8.8.5/8.8.5) with SMTP id LAA23717 for ; Sat, 5 Sep 1998 11:41:46 -0500 Date: Sat, 5 Sep 1998 11:41:46 -0500 (CDT) From: Bibek Sahu To: axp-list@redhat.com Subject: Re: dlsym() broken on alpha? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On a redhat 5.1 system, you probably don't have /lib/libm.so. Change that to the name of the file that is actually on your machine. It might be handy if you use the other chunk of code in the man page, the chunk that checks for errors every step of the way and tells you what went wrong. ;-) Good Luck! If you need any more help, lemme know. - Bob On 3 Sep 1998, Eric Ding wrote: > 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 > > 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 > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com >