cvs commit: src/release/alpha dokern.sh drivers.conf

Terry Lambert tlambert2 at mindspring.com
Tue May 20 01:57:56 PDT 2003


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


More information about the freebsd-hackers mailing list