Linux内核中编译选项文件以及函数之间依赖关系的解析方法
第41卷第6A期 计算机科学 V01.41No.6A
2014年6月 Science June2014
Computer
Linux内核中编译选项、文件以及函数之间依赖关系的解析方法
江梦涛潘朋飞宋杨荆琦
(北京大学软件与微电子学院 北京100871)
摘要Linux内核中的编译选项为内核提供了功能定制的可能性,但从传统静态代码分析的角度较难获得编译选
项的改变对软件代码实际的影响。基于Linux内核源码,提出一种从编译选项开始,一直到函数调用关系的分析思
路,同时给出了与编译选项相关的源代码的分层模型及其具体的分析做法,对于理解Linux内核源码特男q是其中的编
译依赖有现实意义。
关键词操作系统,Linux内核,静态代码分析
中图法分类号TP314文献标识码A
of
Method betweentheLinuxKernel Filesand
Functions
ParsingDependencies CompilingOptions,Source
JIANG PAN SONG
Meng-taoPeng-fei YangJINGQi
(SchoolofSoftwareand
Microelectronies,Peking100871,CNm)
University,Beijing
Al矧wact inLinuxKernel the of customizationin
Compilationoptions providepossibilitiesfunctionality operationsys-
in
tern,buttraditionalmethodofstaticcode ishardtOknowhowa couldaffectthesource
analysis,it compilationoption
codeofLinuxkernel.Basedon
theLinuxkemdsource,this a of the between
paperpresentswayanalyzkngrelationship
andfunctioncallsfromthe level,andthehierarchicalmodelassociatedwiththe
compilationoptions,files top gives
sourcecodeand
compileoptions.
code
KeywordsOperatingsystem,Linuxkernel,Static
analysis
分析,为不同层次之间的静态代码分析提供了一种思路;同时
1概述
给出了与编译选项相关的源代码的分层模型及其具体的分析
对大型软件进行静态代码分析时,往往需要分析各个模 做法,对