From owner-freebsd-hackers@FreeBSD.ORG Tue May 20 01:57:56 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A4D937B401 for ; Tue, 20 May 2003 01:57:56 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADAE343F93 for ; Tue, 20 May 2003 01:57:55 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc0ps.dialup.mindspring.com ([209.86.3.60] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19I2wA-0003DD-00; Tue, 20 May 2003 01:57:35 -0700 Message-ID: <3EC9ED56.56E9B12@mindspring.com> Date: Tue, 20 May 2003 01:54:46 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel O'Connor References: <20030518005055.GG12759@sunbay.com> <200305192355.h4JNtx4e076037@khavrinen.lcs.mit.edu> <200305201733.43619.doconnor@gsoft.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a40ae10a08791af2ca7c3b70df4e6d7065666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: Garrett Wollman cc: Scott Long cc: freebsd-hackers@freebsd.org Subject: Re: cvs commit: src/release/alpha dokern.sh drivers.conf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2003 08:57:56 -0000 Daniel O'Connor wrote: > Currently I don't see a way of extracting PCI IDs from module source in a > standard way which means the lists would have to be maintained manually and > that would _suck_. Perhaps some standard struct array could be used, and if > it isn't present then you can't do a guess about whether to load the module > or not, so you just prompt the user. Add a seperate section for it. See the "--remove-section" and the "--add-section" and "--change-section" arguments to the "objcopy" program for how to maintain the lists seperate from the driver (even works with binary-only drivers for which you don't have source, so long as there's a defined structure that's a known type for the ID list sources, and has a NULL terminator on the list and/or uses a linker set type construct). You could even have a program that you "objcopy" the section from the module into, which could then spit out source code by printing out the ID table by direct reference to the table itself; tack your new IDs to the end of the ID list that gets spit out, recompile it, and drop it; or just link against the same "bfd" library "objcopy" links against, and make a small edit program ("vielf" or whatever). -- Terry