最短的GAS ARM(Linux)的计划? [英] Shortest possible GAS ARM (linux) program?
问题描述
我玩弄学习汇编语言的想法,并决定给ARM一试。我决定去与GNU汇编,主要是因为它在我的手机的仓库中,这样我就可以与任何地方集会玩,如果我很无聊。
I've toyed with the idea of learning an assembly language, and have decided to give ARM a try. I've decided to go with the GNU assembler, mostly because it's available in my cellphone's repository, so that I could play around with assembly anywhere, if I'm bored.
不管怎样,我在网上搜索,但我无法找到如何正确地退出了ARM的Linux二进制任何一种参考。我明白,相当于86套基本EAX寄存器到数字,指定系统调用,然后调用系统中断0x80到实际执行系统调用,正常退出程序;现在我想做的ARM类似的东西(显然同code不起作用,因为它使用的x86特定寄存器和诸如此类的东西)。
Anyway, I've searched the web, but I can't find any kind of reference for how to properly exit an ARM Linux binary. I've understood that the x86 equivalent basically sets the eax register to a number specifying the system call, and then calls system interrupt 0x80 to actually perform the system call, properly exiting the program; now I want to do something similar for ARM (and obviously the same code doesn't work, since it uses x86 specific registers and whatnot).
所以,是的,基本上,我怎么会写一个最小的ARM GAS可执行,只需用退出值0正常退出?
So yeah, basically, how would I write a minimal GAS ARM executable, simply exiting normally with exit value 0?
推荐答案
有就是对系统的一些信息,来电的 http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3105/4 。您还可以看看 http://isec.pl/papers/into_my_arms_dsls.pdf 第5页
There is some information on system calls at http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3105/4. You can also look at page 5 of http://isec.pl/papers/into_my_arms_dsls.pdf.
这篇关于最短的GAS ARM(Linux)的计划?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!