Subject: obscure ld switches
To: None <current-users@NetBSD.ORG>
From: Chris Jones <>
List: current-users
Date: 04/23/1998 13:24:39
I'm trying to make a package out of the RScheme distribution, which is a
nifty Scheme compiler I've been playing with lately.  The catch is, in
order to really make the package useful, it needs to do some strange
dlopen() types of things.  The docs say that a particular program in the
package needs to be "linked with a flag to ld indicating that the dynamic
linker can use symbols in the executable to resolve unresolved symbols in
dynamically linked code.  The name of this flag varies between systems.
On GNU/Linux, it is -rdynamic."

When I try "-Wl,-rdynamic" in CFLAGS, it generates an executable which
dumps core in start().

When I try "-rdynamic" in CFLAGS, or if I don't try any special flags, it
produces an executable which claims it can't load the shared objects I
point it at.

I've tried other interesting-sounding flags to ld, but they either produce
non-executables, or they produce executables which dump core.  Before I
really dig into the source, is there anybody out there that knows more
about ld than I do, and who could point me at the right flag?


Chris Jones                            
           Mad scientist in training...
"Is this going to be a stand-up programming session, sir, or another bug hunt?"