将C代码转换为Assembly! [英] Converting C code to Assembly!

查看:109
本文介绍了将C代码转换为Assembly!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hey Folks,

虽然很清楚,每个编译器都会产生一个

整合代码watever高语言源文件,但是你要付出
编译,但我想知道的是,是否有任何工具或至少

avr-gcc的一些命令行选项可以生成汇编代码,而不需要任何额外的东西。好吧,我有C winAVR源文件,我想要它在装配中确切的

复制品,没有任何ctors,do_copy_data等..


问候


ali

Hey Folks,
Though it is crystal clear that every compiler produces an
assebmly code watever high language source file you are going to
compile , but what i want to know is that is there any tool or atleast
some command line options for avr-gcc to produce assembly code without
any extra stuff . Well i have C winAVR source file and i want its exact
replica in assembly , without any ctors , do_copy_data etc..

Regards

ali

推荐答案

阿里写道:
虽然很清楚每个编译器生成一个
汇编代码watever高级语言源文件,你要编译


编号。有些编译器直接从中级翻译

代表二进制代码。

但是我想知道的是有没有任何工具或者至少有一些命令行选项可供avr-gcc生成汇编代码而不需要副本在汇编,没有任何ctors,do_copy_data等..
Though it is crystal clear that every compiler produces an
assembly code watever high language source file you are going to
compile
No. Some compilers do translate directly from intermediate
representation to binary code.
but what i want to know is that is there any tool or at least
some command line options for avr-gcc to produce assembly code without
any extra stuff . Well i have C winAVR source file and i want its exact
replica in assembly , without any ctors , do_copy_data etc..




你应该问WinAVR邮件列表。
http://sourceforge.net/mail/?group_id = 68108


我想你试过-S标志?



You should ask on the WinAVR mailing list.
http://sourceforge.net/mail/?group_id=68108

I imagine you tried the -S flag?


" Ali" < AB ******** @ gmail.com>写道:
"Ali" <ab********@gmail.com> writes:
虽然很清楚,每个编译器都会生成一个
汇编代码watever高级语言源文件,你要编译,


不一定。有些编译器可能直接生成机器代码,

而不经过中间汇编语言步骤。

但我想知道的是有没有任何工具或至少
avr-gcc的一些命令行选项可以生成汇编代码,而不需要任何额外的东西。好吧,我有C winAVR源文件,我想要它在装配中的确切
复制品,没有任何ctors,do_copy_data等..
Though it is crystal clear that every compiler produces an
assebmly code watever high language source file you are going to
compile ,
Not necessarily. Some compilers might generate machine code directly,
without going through an intermediate assembly language step.
but what i want to know is that is there any tool or atleast
some command line options for avr-gcc to produce assembly code without
any extra stuff . Well i have C winAVR source file and i want its exact
replica in assembly , without any ctors , do_copy_data etc..




我不知道你的意思是什么额外的东西,但你的问题真的是

与C编程语言没什么关系。


< http://sourceforge.net/projects/winavr/>有链接到邮件列表。


-

Keith Thompson(The_Other_Keith) ks***@mib.org < http://www.ghoti.net/~kst>

圣地亚哥超级计算机中心< *> < http://users.sdsc.edu/~kst>

我们必须做点什么。这是事情。因此,我们必须这样做。



I don''t know what you mean by "extra stuff", but your question really
doesn''t have much to do with the C programming language.

<http://sourceforge.net/projects/winavr/> has links to mailing lists.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


>我想你试过-S标志?

是的,我真的很想念这个!谢谢Grumble。
>I imagine you tried the -S flag?
Yeah , i was really missing this! thanks Grumble.
没有。有些编译器会直接从中间表示转换为二进制代码。
嗯这是讨论的问题,因为汤普森也在他的帖子中指出。

对我来说,任何合理的编译器写作者都不应该跳过这一步。

他可以把这个选项。

我不知道你的意思是什么额外的东西
这意味着*不*为对象转储提供-S选项。是不是很简单

明白了?

但是你的问题与C编程语言没什么关系。
No. Some compilers do translate directly from intermediate representation to binary code. Well thats matter of discussion as Thompson also pointed in his post.
To me any reasonable compiler writter should not skip this step though
he can put this optional.
I don''t know what you mean by "extra stuff" It means *not* providing -S option for object dump. Isn''t simple to
understand?
but your question really doesn''t have much to do with the C programming language.




来吧我在这里得到了解决方案,你说它不对了

这个问题的问题;-)事实上这篇文章与C有关。


对原帖有点补充:

实际上,高级语言我指的是c / c ++ / delphi等rahter markUp

语言。



Come on i got the solution here and you are saying that its not right
place to ask such question;-) Infact this post is related to C.

A little addition to original post:
Infact by high level languages i mean c/c++/delphi etc. rahter markUp
languages.


这篇关于将C代码转换为Assembly!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆