Traduisez -
Übersetzen -
Traduzca -
Traduza -
Tradurre -
Translate
Re: Retrieving kernel compile options
csd@netbox.com
Wed, 10 Jun 1998 17:19:31 -0700 (PDT)
> On Wed, 10 Jun 1998, Kevin Chu wrote:
>
> > Anyone know how to get the compile options (those you'd enter into
> > make xconfig) out of an already-compiled kernel? The compiled kernel
> > is a 2.0.33, if that matters.
>
> Uh, ouch!
>
> There's not going to be a terribly easy way to do that, as far as
> I know (unless someone's added something to the compile process
> since the last time I looked at it).
>
> Are you looking for specific information, such as the presence of
> a driver or the setting of a variable? If so, you can use tools
> such as nm(1) to look for the presence (or absence) of various
> function names in the symbol table, and the values variables are
> initialised to.
>
> If you want the complete config information, you'd have to go
> through the entire list of settings, for each one determine the
> way to figure out from the nm(1) output what it's set to, and then
> look through the output to find out the answer.
Not even this will work - there are certain compile options (e.g. CSLIP) which
will only generate different code, with no other indication of their
presence/absence. You can't get all of the options from the binary version.
Unless you start looking for actual code to indicate the presence of an
option... then you also have to know the compiler version & CPU model it was
compiled for :-).
CSD