Date: Thu, 18 May 2000 22:02:12 -0400 From: "Brian J. McGovern" <mcgovern@spoon.beta.com> To: Alfred Perlstein <bright@wintelcom.net> Cc: "Brian J. McGovern" <mcgovern@spoon.beta.com>, questions@FreeBSD.ORG, mcgovern@spoon.beta.com Subject: Re: Accessing [non dynamic] symbols in shared library/_init and _fini Message-ID: <200005190202.WAA83948@spoon.beta.com> In-Reply-To: Your message of "Thu, 18 May 2000 15:29:12 PDT." <20000518152912.F21508@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[snip] > You'll need to link with -export-dynamic for your main program's > symbols to be visible. Yup. Was right in the man page, and I went right over it (NOTES section). > For shared libraries initilization at link time you'll have to look > harder, I found it once but I can't remeber how to do it. I looked harder. Again, its in the man page, but I wasn't interpreting the errors correctly. _init() and _fini() can be in the library, and they're called when loaded/unloaded. You just have to link with -nostdlib to get rid of the crt0 definitions. Now everything is working like a charm :) -Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005190202.WAA83948>