Chinaunix首页 | 论坛 | 博客
  • 博客访问: 203480
  • 博文数量: 33
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 330
  • 用 户 组: 普通用户
  • 注册时间: 2007-01-20 16:34
个人简介

..

文章分类

全部博文(33)

文章存档

2012年(1)

2011年(8)

2010年(8)

2009年(4)

2007年(12)

我的朋友

分类: LINUX

2011-07-29 16:33:39

查看内核文件的编译参数时, 可以先全编译一遍kernel. 然后在把要分析的那个文件生成出来的.o删掉再编译.

linux-2.6.29$ make
linux-2.6.29$ rm arch/mips/kernel/entry.o -f
linux-2.6.29$ make V=1 >abc.log 2>&
linux-2.6.29$ vi abc.log

vi查到编译选项:
  mips_4KC-gcc -Wp,-MD,arch/mips/kernel/.entry.o.d  -nostdinc -isystem /vobs/cots/winpath3_tools/tool_chain/eldk4mips_4.1/usr/bin/../lib/gcc/mips-linux/4.0.0/include -Iinclude  -I/hix/she_iu_ngvdsl/kernel/linux-2.6.29_ts/arch/mips/include -include include/linux/autoconf.h -D__KERNEL__ -D__ASSEMBLY__ -ffunction-sections -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding  -march=mips32r2 -Wa,-mips32r2 -Wa,--trap -I/hix/she_iu_ngvdsl/kernel/linux-2.6.29_ts/arch/mips/include/asm/mach-winpath -I/hix/she_iu_ngvdsl/kernel/linux-2.6.29_ts/arch/mips/include/asm/mach-generic -gdwarf-2     -c -o arch/mips/kernel/entry.o arch/mips/kernel/entry.S

加入 -E -dD.
  mips_4KC-gcc -Wp,-MD,arch/mips/kernel/.entry.o.d  -nostdinc -isystem /vobs/cots/winpath3_tools/tool_chain/eldk4mips_4.1/usr/bin/../lib/gcc/mips-linux/4.0.0/include -Iinclude  -I/hix/she_iu_ngvdsl/kernel/linux-2.6.29_ts/arch/mips/include -include include/linux/autoconf.h -D__KERNEL__ -D__ASSEMBLY__ -ffunction-sections -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding  -march=mips32r2 -Wa,-mips32r2 -Wa,--trap -I/hix/she_iu_ngvdsl/kernel/linux-2.6.29_ts/arch/mips/include/asm/mach-winpath -I/hix/she_iu_ngvdsl/kernel/linux-2.6.29_ts/arch/mips/include/asm/mach-generic -gdwarf-2     -c -E -dD -o arch/mips/kernel/entry.i arch/mips/kernel/entry.S

阅读(2324) | 评论(0) | 转发(0) |
0

上一篇:bash hotkey

下一篇:安装fvwm (简单笔记)

给主人留下些什么吧!~~