gcc -S hello.c得到的汇编程序看不懂

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
jindafeng2010
帖子: 5
注册时间: 2010-02-02 22:12

gcc -S hello.c得到的汇编程序看不懂

#1

帖子 jindafeng2010 » 2010-07-05 14:57

这个是hello world的汇编程序,是gcc -S hello.c得到的,想问的是为什么这个汇编程序我看不懂啊,push,mov...什么的后面都加了l,纳闷中.......

.file "hello.c"
.section .rodata
.LC0:
.string "Hello,World"
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
andl $-16, %esp
subl $16, %esp
movl $.LC0, (%esp)
call puts
movl $0, %eax
leave
ret
.size main, .-main
.ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3"
.section .note.GNU-stack,"",@progbits
头像
comfanter
帖子: 190
注册时间: 2009-05-02 14:51

Re: gcc -S hello.c得到的汇编程序看不懂

#2

帖子 comfanter » 2010-07-05 15:31

AT&T风格汇编,加l是32位数据
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: gcc -S hello.c得到的汇编程序看不懂

#3

帖子 leeaman » 2010-07-05 15:35

可怕的东西...
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
comfanter
帖子: 190
注册时间: 2009-05-02 14:51

Re: gcc -S hello.c得到的汇编程序看不懂

#4

帖子 comfanter » 2010-07-05 15:40

Using Assembly Language in Linux http://asm.sourceforge.net/articles/linasm.html
jindafeng2010
帖子: 5
注册时间: 2010-02-02 22:12

Re: gcc -S hello.c得到的汇编程序看不懂

#5

帖子 jindafeng2010 » 2010-07-09 9:25

:em11 谢谢!
delectate
帖子: 18311
注册时间: 2008-01-09 22:41

Re: gcc -S hello.c得到的汇编程序看不懂

#6

帖子 delectate » 2010-07-09 9:26

leeaman 写了:可怕的东西...
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: gcc -S hello.c得到的汇编程序看不懂

#7

帖子 黄美姬 » 2010-07-09 9:33

虽然不会,但也会点木马免杀 :em04
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
delectate
帖子: 18311
注册时间: 2008-01-09 22:41

Re: gcc -S hello.c得到的汇编程序看不懂

#8

帖子 delectate » 2010-07-09 9:38

黄美姬 写了:虽然不会,但也会点木马免杀 :em04
想想就头痛。还不如找个源码自己改,比花指令什么的好多了
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: gcc -S hello.c得到的汇编程序看不懂

#9

帖子 黄美姬 » 2010-07-09 21:11

会的就是花指令,不用源码,直接改PE,在空指令的地方随便加加垃圾指令,在特征码处乱跳,再跳回,再改入口之类的
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
回复