Date: Thu, 18 May 2000 16:51:25 -0400 From: "Brian J. McGovern" <mcgovern@spoon.beta.com> To: questions@freebsd.org Subject: Accessing [non dynamic] symbols in shared library/_init and _fini Message-ID: <200005182051.QAA82814@spoon.beta.com>
next in thread | raw e-mail | index | archive | help
I've just starting playing with dlopen() and family. So far, I've got it opening up libraries and using the functions contained therein. The functions in the dynamic library use stdio routines, such as printf() without problems. The issue, simply, is that I'm clueless about the mechanics. The next thing I'd like to do is be able to call a function thats not shared, but linked in to the main program. This comes back as an undefined symbol. Secondly, i'm currently compiling the libraries simply as: cc -shared -o foo.so foo.c It there anything I should add/change/etc? Also, I've been reading a few of the man pages, and it seems that ld handles calling _init and _fini at program startup and shutdown. I was curious if something similar is automatically done for shared libraries that are loaded? I'd like to have some initialization done without having to poke the user of the library to have to do it. Suggestions? -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?200005182051.QAA82814>