home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!darwin.sura.net!mips!swrinde!elroy.jpl.nasa.gov!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!uc.msc.edu!shamash!runyon.cim.cdc.com!pbd
- From: pbd@runyon.cim.cdc.com (Paul Dokas)
- Newsgroups: comp.sys.sgi
- Subject: What's wrong with ldopen()???
- Message-ID: <45863@shamash.cdc.com>
- Date: 29 Jul 92 18:05:51 GMT
- Sender: usenet@shamash.cdc.com
- Reply-To: pbd@runyon.cim.cdc.com (Paul Dokas)
- Organization: ICEM Systems, Inc
- Lines: 41
-
- We just upgraded to 4.0.5 and it broke our dynamic loader :-(
-
- I've traced the problem down to ldopen(). Well actually with the
- structure that ldopen() returns. The code fragment that is
- suspicious is:
-
- #include <ldfcn.h>
-
- void load(char *fname)
- {
- LDFILE *ld;
- int fd;
-
- ld = ldopen(fname, (LDFILE *) 0);
- fd = fileno(IOPTR(ld));
-
- printf("fd = %d\n", fd)
-
- ldclose(ld);
- }
-
- It always prints:
-
- fd = -1
-
- :-(
-
- This worked on 4.0.1, but not under 4.0.5.
-
- BTW, I've omitted all of the calls to other ld* functions (ldread, etc)
- that work. It seems that the LDFILE structure is just not getting
- filled in correctly.
-
- Any help solving this problem is greatly appreciated!
-
- --
- #include <std.disclaimer>
- #define FULL_NAME "Paul Dokas"
- #define EMAIL_PRIMARY "pbd@runyon.cim.cdc.com"
- #define EMAIL_SECONDARY "pbd@power1.cim.cdc.com"
- /*** Overpopulation is the leading cause of most environmental problems ***/
-