我知道,我可以通过使用:
gcc -S ...
即便如此令人厌恶地这样做,也使我成为这一进程的一部分。
但是,我怎么能够了解所编纂的法典? 我指的是地址、矿石的产生等等。
<代码>gcc-S 我不想告诉我有关教学时间长短或编码的内容。
我知道,我可以通过使用:
gcc -S ...
即便如此令人厌恶地这样做,也使我成为这一进程的一部分。
但是,我怎么能够了解所编纂的法典? 我指的是地址、矿石的产生等等。
<代码>gcc-S 我不想告诉我有关教学时间长短或编码的内容。
我喜欢objdump
,但最有用的选择是不明确的,特别是如果你在包含搬迁的物体档案中重新使用,而不是最后的双筒。
<代码>objdump-d some_binary <>/code> 做合理的工作。
objdump -d some_object.o
用处不大,因为要求外部职能时,没有进行有益的分组:
...
00000005 <foo>:
5: 55 push %ebp
6: 89 e5 mov %esp,%ebp
8: 53 push %ebx
...
29: c7 04 24 00 00 00 00 movl $0x0,(%esp)
30: e8 fc ff ff ff call 31 <foo+0x2c>
35: 89 d8 mov %ebx,%eax
...
...
29: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2c: R_386_32 .rodata.str1.1
30: e8 fc ff ff ff call 31 <foo+0x2c>
31: R_386_PC32 printf
...
然后,我认为,每个附加说明的行文作为<代码><symbol+offset>objdump是有用的。 这里有一条手法,但可以放弃实际倾销的副作用——objdump --prefix-addresses -dr some_object.o
。 说明:
...
00000005 <foo> push %ebp
00000006 <foo+0x1> mov %esp,%ebp
00000008 <foo+0x3> push %ebx
...
但我们认为,通过提供
www.un.org/Depts/DGACM/index_french.htm --———— -dr file.o
产出如下:
...
00000005 <foo> 55 push %ebp
00000006 <foo+0x1> 89 e5 mov %esp,%ebp
00000008 <foo+0x3> 53 push %ebx
...
00000029 <foo+0x24> c7 04 24 00 00 00 00 movl $0x0,(%esp)
2c: R_386_32 .rodata.str1.1
00000030 <foo+0x2b> e8 fc ff ff ff call 00000031 <foo+0x2c>
31: R_386_PC32 printf
00000035 <foo+0x30> 89 d8 mov %ebx,%eax
...
如果你用分解符号(即用<代码>-g汇编)建造,并且将<代码>-dr改为-Srl
,则将尝试用相应的源线来说明产出。
快速列名最容易的方法是使用<代码>-a的机组选择,由您在<条码>上填入<代码>-Wa,-a。 指挥线。 你们可以使用各种摩托车,选择完全影响所发现的东西——参看第(1)页。
象你想要一个团结者一样,我听起来。 <代码>objdump 大体上是标准(otool
on Mac OS X);与任何地图一起向您提供您的链接者提供的信息,对您的物体文档进行拆解,应给你一切希望。
gcc 将产生一个组装语言来源档案。 然后,你可以使用<代码>——你的文件。 S,以编制一份清单,列出每项指示的对应和编码。 <代码>-a还有控制列名档案中显示的内容的若干次选择(as - help
)。 将提供清单和其他可供选择的方案。
nasm -f elf xx.asm -l x.lst
gcc xx.c xx.o -o xx
生成一份清单文件x.lst,只有xx。 页: 1
iii
Following along from this question: how-do-i-check-if-gcc-is-performing-tail-recursion-optimization, I noticed that using gcc with -fPIC seems to destroy this optimization. I am creating a shared ...
I would like to know how to generate assembler code from a C program using Unix. I tried the gcc: gcc -c file.c I also used firstly cpp and then try as but I m getting errors. I m trying to build an ...
OK, I have old Metrowerks code for Mac and Windows where the previous developer used pre-compiled headers for every project that this code base builds. How does one get rid of Pre-compiled headers, ...
I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....
I ve recently set up a MinGW + MSYS environment on my laptop to check how things are with Netbeans C/C++ support. Everything seems to work fine, however, during my testing I have noticed a difference ...
I d like to compile my application for version 10.5 and forward. Ever since I upgraded to Snow Leopard and installed the latest XCode, gcc defaults to 10.6. I ve tried -isysroot /Developer/SDKs/...
We can get the type returned by function in gcc using the typeof operator as follows: typeof(container.begin()) i; Is it possible to do something similar for functions taking some arguments, but not ...
Is it possible to create binaries of other platform on Linux? Say I have a program that can be compiled using gcc to .o file but can we use it to output exe that can be run on windows ?