From owner-freebsd-hackers Tue Jan 19 23:39:17 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA18728 for freebsd-hackers-outgoing; Tue, 19 Jan 1999 23:39:17 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail.calweb.com (mail.calweb.com [208.131.56.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA18722 for ; Tue, 19 Jan 1999 23:39:14 -0800 (PST) (envelope-from jkf@calweb.com) Received: by mail.calweb.com (8.8.6/8.8.6) with SMTP id XAA27754 for ; Tue, 19 Jan 1999 23:39:07 -0800 (PST) X-SMTP: helo web2.calweb.com from jkf@calweb.com server jkf@web2.calweb.com ip 208.131.56.52 Date: Tue, 19 Jan 1999 23:39:06 -0800 (PST) From: "Jason K. Fritcher" To: freebsd-hackers@FreeBSD.ORG Subject: Symbol mappings in loadable objects. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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