Date: Tue, 19 Jan 1999 23:39:06 -0800 (PST) From: "Jason K. Fritcher" <jkf@calweb.com> To: freebsd-hackers@FreeBSD.ORG Subject: Symbol mappings in loadable objects. Message-ID: <Pine.BSF.4.02A.9901192316220.16652-100000@web2.calweb.com>
next in thread | raw e-mail | index | archive | help
Hello. After hunting through the mailing list archives for a solution, I am at a loss for my problem. I have been expermimenting with dynamic loadable objects using dlopen() and dlsym(). I have figured out how to get the main code to obtain pointers to symbols in the loaded object and to call them, but I can not figure out how to get the loadable object to call function in the main code. All I get when running the main code is this error: dlopen: ./mod_blah.so: Undefined symbol "blah_blah" I have tried looking through the Apache code to see if there was anything obvious in there, I have also looked through the code to Listar, and again couldn't find anything appearant. I have read dlopen(3), dlsym(3), and link(5), but I can't find anything useful. The commands I am using to compile the modules is: gcc -DPIC -fPIC -g -o mod_blah.o -c mod_blah.c ld -shared -o mod_blah.so mod_blah.o And I'm compiling the main program like this: gcc -g -o blah blah.c If any other information is needed let me know, and I'll answer any questions to the best of my ability. If there is any online info on doing this, pointers would be much appriciated. Otherwise, maybe a couple hints to help me along. :) Thanx. -------------------------------------------------------------------------- Jason K. Fritcher System Administrator jkf@calweb.com CalWeb Internet Services http://www.calweb.com/ 916-641-9320 -------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9901192316220.16652-100000>