Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Bibek Sahu <scorpio@dodds.net>
To: axp-list@redhat.com
Subject: Re: dlsym() broken on alpha?
Date: Sat, 5 Sep 1998 11:41:46 -0500 (CDT)	[thread overview]
Message-ID: <Pine.LNX.3.95.980905113846.23643B-100000@norad.dodds.net> (raw)
In-Reply-To: <yv44suon9tf.fsf@tuxedo.applix.com>


	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 <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
> 
> -- 
> 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
> 


  reply	other threads:[~1998-09-05 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-03 21:52 dlsym() broken on alpha? Eric Ding
1998-09-05 16:41 ` Bibek Sahu [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-09-03 22:02 Eric Ding
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox