A configuração do kernel Linux, eventualmente, define quais são as diretivas de pré-processador para o compilador C. A saída das fontes pré-processadas deve estar próxima ao que você está procurando, embora também possa haver um código morto otimizado pelo compilador.
O compilador gcc
pode ser solicitado a gerar a saída pré-processada para stdout usando -E
(e depois parar):
-E Stop after the preprocessing stage; do not run the compiler
proper. The output is in the form of preprocessed source code,
which is sent to the standard output.
Para todo o kernel, pode ser mais fácil incorporar o sinalizador --save-temps
do compilador:
-save-temps
-save-temps=cwd
Store the usual "temporary" intermediate files permanently; place
them in the current directory and name them based on the source
file. Thus, compiling foo.c with -c -save-temps would produce
files foo.i and foo.s, as well as foo.o. This creates a
preprocessed foo.i output file even though the compiler now
normally uses an integrated preprocessor.
When used in combination with the -x command line option,
-save-temps is sensible enough to avoid over writing an input
source file with the same extension as an intermediate file. The
corresponding intermediate file may be obtained by renaming the
source file before using -save-temps.