🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #7871

Dynamic shared libraries

#7871
From: Peter McGavin DSIR Physical Scie...
Date: Tue, 04 Jun 1991 18:40
28 lines
1662 bytes
Path: windy!srwmpnm
From: srwmpnm@windy.dsir.govt.nz
Newsgroups: comp.sys.sun
Subject: Dynamic shared libraries
Message-ID: <18894.282916ba@windy.dsir.govt.nz>
Date: 9 May 91 09:30:34 GMT
Summary: How do I map memory after dlopen()?
Keywords: dynamic shared libraries dlopen ld
Organization: DSIR, Wellington, New Zealand
News-Moderator: Approval required for posting to comp.sys.sun
Lines: 16

Has anyone successfully called "the simple programmatic interface routines to
the dynamic linker" dlopen(), dlsym(), dlerror() and dlclose(), on a Sun 4?

Everything works ok if I explicitly ld the main program with the shared
library, but in that case there's not much point in calling the dl*() routines
anyway.  In my case I don't know the name of the shared library until
run-time, so I can't ld with the library.

If I don't ld with the library then dlopen() and dlsym() succeed, but memory
at the location returned by dlsym() never gets mapped.  I get a segment
violation when I try to access memory there.

What do I have to do to ensure the memory gets mapped?  Any help would be
appreciated.

Thanks, Peter McGavin.   (srwmpnm@wnv.dsir.govt.nz)
Technical Details
Message-ID: <2962@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: Peter McGavin, DSIR Physical Sciences, Applied Maths
Newsgroups: comp.sys.sun
Subject: Dynamic shared libraries
Keywords: No Digest Subjects in Unmoderated Mode
Message-ID: <2962@brchh104.bnr.ca>
Date: 4 Jun 91 18:40:00 GMT
Sender: news@brchh104.bnr.ca
Organization: Sunspots, Psuedo-Unmoderated
Lines: 29
Approved: sun-spots@rice.edu
X-Original-Date:    Thu, 9 May 1991 09:32 NZST