Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262451AbTEFIdU (ORCPT ); Tue, 6 May 2003 04:33:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262457AbTEFIdU (ORCPT ); Tue, 6 May 2003 04:33:20 -0400 Received: from corky.net ([212.150.53.130]:1422 "EHLO marcellos.corky.net") by vger.kernel.org with ESMTP id S262451AbTEFIdT (ORCPT ); Tue, 6 May 2003 04:33:19 -0400 Date: Tue, 6 May 2003 11:45:41 +0300 (IDT) From: Yoav Weiss X-X-Sender: yoavw@marcellos.corky.net To: D.A.Fedorov@inp.nsk.su, , <76306.1226@compuserve.com> Cc: linux-kernel@vger.kernel.org Subject: Re: The disappearing sys_call_table export. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1333 Lines: 29 > But how? When some global will not be exported, it would not be listed > in /proc/ksyms. So what ? You just find the right address (in this case by getting the addresses of exported syscalls and finding a list in memory, containing them in the right order), and cast it to be the syscall table. If you want it to work with a binary-only driver, you can even insmod a small module that does that and adds the result to the symbol table for other modules to use. We've been doing that for years on closed-source systems like AIX. The above is just one way to locate a struct in memory. A faster way is to find some exported structs which are known to point to the unexported symbol from some offset, extract the symbol's address, and "re-export" it. In fact, in linux which is opensource, you can probably write a script that extracts any unexported symbol from the source code, find a path to it from some exported symbol, and automagically create a module that re-exports this symbol for your legacy driver to use. If you write the script, don't forget to GPL it :) Yoav Weiss - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/