作者bizkit (很讨厌)
看板ASM
标题Re: [问题] 请问一下有关Ubuntu下的MIPS
时间Fri Mar 28 03:24:01 2008
※ 引述《xinu (xinu)》之铭言:
: ※ 引述《bizkit (有点期待)》之铭言:
: : google: cross compilation
: : http://www.speedblue.org/cross_compilation/
: 除了cross compile以外, 要看组合语言还要
: objdump反组译
: 以arm来看就是arm-linux-objdump -xDSl [executable]
: 就可以看到用x86和arm在每一个source code编译成assembly有什麽不同
: 记得把-O设成不optimize可以清楚一点...应该是-O0
: 对了, 忘了说在gcc编译要加-g
hi,
补充一下
gcc/g++ 编译的时候可以设定参数请他将过程保留下来
在编译的过程就留下assembly的版本
请看 man g++
objdump 好像也不需要搭配 -g 的参数
他可以用来给 gdb debug
但我并不了解他实际上是多留了什麽讯息 有人可以解惑吗:)
==
-save-temps
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 prepro‐
cessed foo.i output file even though the compiler now normally uses
an integrated preprocessor.
....[snip]
=
-g Produce debugging information in the operating system’s native for‐
mat (stabs, COFF, XCOFF, or DWARF 2). GDB can work with this
debugging information.
....[snip]
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.132.58.176