gcc -g选项产生的.s文件,hello.c对应的,很有参考价值!!!
2014-12-30 23:23
176 查看
.file "hello.c"
gcc_compiled.:
.text
LC0:
.ascii "Hello, world!\12\0"
.align 2
.globl _main
_main:
pushl %ebp
movl %esp,%ebp
pushl $LC0
call _printf
xorl %eax,%eax
jmp L1
.align 2
L1:
leave
ret
下面的是带-g选项产生的hello.s
.file "hello.c"
gcc_compiled.:
.stabs "hello.c",100,0,0,Ltext
Ltext:
.stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0
.stabs "char:t2=r2;0;127;",128,0,0,0
.stabs "long int:t3=r1;-2147483648;2147483647;",128,0,0,0
.stabs "unsigned int:t4=r1;0;-1;",128,0,0,0
.stabs "long unsigned int:t5=r1;0;-1;",128,0,0,0
.stabs "short int:t6=r1;-32768;32767;",128,0,0,0
.stabs "long long int:t7=r1;0;-1;",128,0,0,0
.stabs "short unsigned int:t8=r1;0;65535;",128,0,0,0
.stabs "long long unsigned int:t9=r1;0;-1;",128,0,0,0
.stabs "signed char:t10=r1;-128;127;",128,0,0,0
.stabs "unsigned char:t11=r1;0;255;",128,0,0,0
.stabs "float:t12=r1;4;0;",128,0,0,0
.stabs "double:t13=r1;8;0;",128,0,0,0
.stabs "long double:t14=r1;8;0;",128,0,0,0
.stabs "void:t15=15",128,0,0,0
.stabs "fpos_t:t3",128,0,0,0
.stabs "size_t:t4",128,0,0,0
.stabs "__stdiobuf_t:t2",128,0,0,0
.stabs "__stdiosize_t:t4",128,0,0,0
.stabs "__iobuf:T16=s44__rptr:17=*2,0,32;__rend:17,32,32;\\",128,0,0,0
.stabs "__wptr:17,64,32;__wend:17,96,32;__base:17,128,32;\\",128,0,0,0
.stabs "__bufsiz:4,160,32;__flag:6,192,16;__file:2,208,8;\\",128,0,0,0
.stabs "__buf:2,216,8;__filbuf:18=*19=f1,224,32;__flsbuf:20=*21=f1,256,32;\\",128,0,0,0
.stabs "__flush:18,288,32;__next:22=*16,320,32;;",128,0,0,0
.stabs "FILE:t16",128,0,0,0
.text
LC0:
.ascii "Hello, world!\12\0"
.align 2
.globl _main
_main:
.stabd 68,0,4
pushl %ebp
movl %esp,%ebp
.stabd 68,0,5
pushl $LC0
call _printf
.stabd 68,0,6
xorl %eax,%eax
jmp L1
.align 2
.stabd 68,0,7
L1:
leave
ret
.stabs "main:F1",36,0,0,_main
gcc_compiled.:
.text
LC0:
.ascii "Hello, world!\12\0"
.align 2
.globl _main
_main:
pushl %ebp
movl %esp,%ebp
pushl $LC0
call _printf
xorl %eax,%eax
jmp L1
.align 2
L1:
leave
ret
下面的是带-g选项产生的hello.s
.file "hello.c"
gcc_compiled.:
.stabs "hello.c",100,0,0,Ltext
Ltext:
.stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0
.stabs "char:t2=r2;0;127;",128,0,0,0
.stabs "long int:t3=r1;-2147483648;2147483647;",128,0,0,0
.stabs "unsigned int:t4=r1;0;-1;",128,0,0,0
.stabs "long unsigned int:t5=r1;0;-1;",128,0,0,0
.stabs "short int:t6=r1;-32768;32767;",128,0,0,0
.stabs "long long int:t7=r1;0;-1;",128,0,0,0
.stabs "short unsigned int:t8=r1;0;65535;",128,0,0,0
.stabs "long long unsigned int:t9=r1;0;-1;",128,0,0,0
.stabs "signed char:t10=r1;-128;127;",128,0,0,0
.stabs "unsigned char:t11=r1;0;255;",128,0,0,0
.stabs "float:t12=r1;4;0;",128,0,0,0
.stabs "double:t13=r1;8;0;",128,0,0,0
.stabs "long double:t14=r1;8;0;",128,0,0,0
.stabs "void:t15=15",128,0,0,0
.stabs "fpos_t:t3",128,0,0,0
.stabs "size_t:t4",128,0,0,0
.stabs "__stdiobuf_t:t2",128,0,0,0
.stabs "__stdiosize_t:t4",128,0,0,0
.stabs "__iobuf:T16=s44__rptr:17=*2,0,32;__rend:17,32,32;\\",128,0,0,0
.stabs "__wptr:17,64,32;__wend:17,96,32;__base:17,128,32;\\",128,0,0,0
.stabs "__bufsiz:4,160,32;__flag:6,192,16;__file:2,208,8;\\",128,0,0,0
.stabs "__buf:2,216,8;__filbuf:18=*19=f1,224,32;__flsbuf:20=*21=f1,256,32;\\",128,0,0,0
.stabs "__flush:18,288,32;__next:22=*16,320,32;;",128,0,0,0
.stabs "FILE:t16",128,0,0,0
.text
LC0:
.ascii "Hello, world!\12\0"
.align 2
.globl _main
_main:
.stabd 68,0,4
pushl %ebp
movl %esp,%ebp
.stabd 68,0,5
pushl $LC0
call _printf
.stabd 68,0,6
xorl %eax,%eax
jmp L1
.align 2
.stabd 68,0,7
L1:
leave
ret
.stabs "main:F1",36,0,0,_main
相关文章推荐
- 【开发参考】Silverlight 4控件对应装配文件表
- 【开发参考】Silverlight 4控件对应装配文件表
- Makefile(或者shell)的变量通过gcc的-D宏定义选项传递给C源文件
- 1.预处理,生成预编译文件(.文件): Gcc –E hello.c –o hello.i 2.编译,生成汇编代码(.s文件): Gcc –S hello.i –o hello.s 3.汇编,生成目标文件(.o文件): Gcc –c hello.s –o hello.o 4.链接,生成可执行文件: linux笔记
- EndNote X7在word中进行文献应用的标签插入时,没有出现数字及对应的参考文件的解决方案
- -bin/sh ./hello not found,程序运行不了,库文件不对应
- GCC选项——不使用默认系统库函数及不搜索默认头文件路径
- 函数调用的原理4点:函数产生名不同,压栈顺序不同,不应由客户清理,客户清理则可执行文件大小更大(许多参考文章,有汇编解释)
- GCC-4.4.3 installation on Ubuntu 12.04-amd64【light测试不成功,仅仅是参考价值】
- [转]Vim打开中文文件乱码 Vim有四个跟字符编码方式有关的选项,encoding、fileencoding、fileencodings、termencoding(这些选项设置请参考Vim文档中e
- 【开发参考】Silverlight 4控件对应装配文件表
- gcc 用combine 选项将多个源文件编译为一个目标文件
- VC中如何产生 Release 版本二进制文件对应的 PDB 文件(转)
- ARM gcc 结构体对应的选项
- 【原创】设置头文件路径, gcc -I 选项写法
- 【开发参考】Silverlight 4控件对应装配文件表
- GCC在C文件中设置pragma选项防止此文件的代码被优化
- rh401 - RPM编包示例 - 一份Makefile文件和与之对应hello.spec文件
- 关于gcc编译产生可调试文件的打印变量问题
- eclipse 下 根据某个类产生对应的测试文件和测试方法的代码