From owner-freebsd-questions@FreeBSD.ORG Mon May 3 12:40:09 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0365216A4CE for ; Mon, 3 May 2004 12:40:09 -0700 (PDT) Received: from nfs.engel-kg.com (mail.engel-kg.com [62.80.41.218]) by mx1.FreeBSD.org (Postfix) with SMTP id 35AE343D41 for ; Mon, 3 May 2004 12:40:07 -0700 (PDT) (envelope-from elmar@engel-kg.com) Received: (qmail 38265 invoked from network); 3 May 2004 19:40:05 -0000 Received: from uranus.engel-kg.com (192.168.10.236) by nfs.engel-kg.com with SMTP; 3 May 2004 19:40:05 -0000 Date: Mon, 3 May 2004 21:40:05 +0200 (CEST) From: elmar gerdes To: freebsd-questions@freebsd.org Message-ID: <20040503210829.L21765@uranus.engel-kg.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: find symbols in loadable kernel module X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2004 19:40:09 -0000 Hi, I'm looking for a mechanism that allows one loadable kernel module to find the symbols of another module, i.e. find a function 'foo' by its name and get the address of it, so I can call it. I've stumbled across kernel objects which should allow me to do this using kobj_lookup_method(), but I haven't found a call to this function anywhere except where it's defined. kernel objects are used for parallel port drivers and sound drivers which use some kind of bus architecture with calls like BUS_ADD_CHILD() et.al.? do I also have to use/implement such a bus architecture just to find some functions by their names? Is there a simpler method to just find the functions, or is there some more information on kernel objects (tutorial, simple example ...)? Any help is welcome. Thanx. elmar