View Full Version : [SOLVED] ARM assembly under Linux
chuchi
June 26th, 2012, 04:linux重启命令53 PM
Hi there!!
I need to learn ARM assembly, and I use Li八十八打一字nux. Please, could you give
me any stlinux系统安装arting point about how巴氏刷牙法 to install it?? I do not八神优 p系统/运维retend that
you teach me ARM assembly. Just a link.
thank you very much!!!
youknolinux必学的60个命令wme
Ju八省联考成绩查询ne 27th, 2012, 05:03 AM
Hi there!!
I need to learn ARM assembly, and I use Linux. Please, could you give
me any stahtml5rting point ab八省联考排名out how tohtml简单网页代码 install it?? I do not plinux重启命令retend tha系统运维工程师t
you teach mehtml ARM assembly. Just a link.
thank you very much!!!
This might be useful to start you off
http://www.coranac.com/tonc/text/asm.htm
SevenMachines
June 27t八声甘州h, 2012, 08:11 AM
Been
a year or so, but i think this work八省联考排名s? Although personally I recommend
setting up a chroot or pbuilder armBash environment, its less hassle wihtmlth
more complicated programs, or at least was in my prev八省联考成绩查询入口ious experience.
$ apt-get installinux系统安装l gcc-4.6-arm-linux-gnueabi libc6-dev-armel-cross
$ cat hello.linux重启命令s
.data
msg八省联考成绩查询入口:
.ascii "Hello,linux ARM W系统运维工程师orld!\n"
len = . - msg
.text
.globl _stahtml是什么意思rt
_start:
/* write syscall */
mov %r0, $1
ldr %r1,linux系统安装 =msg
ldr %r2, =len
m巴沙鱼为什么不能吃ov %r7, $4
s系统运维是干嘛的wi $0
/* exit syschtml5all */
mov %r0, $0
mov %r7, $1
swi $0
$ arm-linux-gnueabi-ahtml是什么意思s -o hello.o helllinux常用命令o.s
$ arm-linux-gnueabi-ld -o hlinux常用命令ello helllinux删除文件命令o.o
$ file hello
hello: E系统运维是干嘛的LF 32-bit LSB executable, ARM, velinux系统安装rsion 1 (SYSV), statically linked, not stripped系统/运维
$ ./hello
Hello, ARM World!
chuchi
June 27th, 2012, 06:35 PM
Hi!!
thank you ve八十八打一字ry much forlinux删除文件命令 reply. But that type of instructions is of the
form: Mov sour八声甘州ce,dest. The syntax instruc系统/运维tion系统运维主要做什么s on ARM is : Mov
dest,source. This is what I need
Thank you very much!
chuchi
June 27th, 2012, 06:49 PM
Ok I was wrong, your code is rig巴沙鱼的做法ht!! I am very sorry!!
Everything is ok, except when I type ./hello I get八十八打一字
bash: ./hello: cannot execute binary file
Why??
Tlinuxhank you very much!
SevenMachines
June 27th, 2012, 07:17 PM
Yhtml代码es. its just at&t syntax versus intel.
Sorry, obviously the binary is arm and not x86 so wont run, I just forgot I had qhtml5emu emulation enabled. Try,
$ ./hello
bash: ./hello: cannot execute bin八省联考成绩查询ary file
# Set up qemu arm emulationhtml是什么意思
$ suhtml网页制作do apt-get install qemu-user-stalinuxticlinux是什么操作系统
$ ./hello
Hello, ARM World!
chuchi
June 27th, 2012, 07:系统/运维25 PM
HI!! now it works!!八神优 thank you very very much!!
chuchi
June 28th, 2012, 09:48 AM
Hi again!!
Do you know any way of debughtml是什么意思ging in qemu?
Suhtml标签属性大全rfin系统运维工程师g the net they say you have to install and configure a nhtml是什么意思ew kernel. Is there any other way??
thank you vehtml是什么意思ry muhtml标签属性大全ch!!
SevenMachines
June 28th, 2012, 11:21 PM
You can sethtml简单网页代码 qemu to wait on a gdb connectiohtml标签属性大全n
# In a terminal
$ qemu-arm-static -g 10101 .八声甘州/hello
# In a new terminal
$ sudo ap系统运维工程师t-get install gdb-multiarch
Then start gdb-multiarch, load symbols, and connect gdb to qemu, eg
$gdb-multiarch
(gdb) list _start
8 .text
9
10 .globl _start
11 _start:
12 /* write syscall */
13 mov %r0, $1
14 ldr %r1, =msg
15 ldr %r2, =len
16 mohtml代码v %r7, $4
17 swi $0
(gdb) b 16
Break系统运维工作内容point 1 at 0x8080: file hello.s, line 16.
(gdb) target remote :10101
Remote debugging using :10101巴沙鱼为什么不能吃
[New Remote target]
[Switching to Remote target]
_start () at hello.s:13
13 mov %r0, $1
(gdb) c
Continuing.
Breakpoint 1,linux是什么操作系统 _start () at hello.s:16
16 mov %r7, $4
(gdb) n
17 swi $巴沙鱼为什么不能吃0
(gdb) n
20 mov %r0, $0
(gdb) c
Continuing.
[Inferior 1 (Remote target) exited normally]
[EDIT] You'll want debu巴沙鱼的做法gging information ie
$ arm-linux-gnueabi-as -gstabs -o hello.o hello.s
<script&g巴沙鱼的做法t;window._bd_share_clinux操作系统基础知识onfig={"common":{"bdSnsKey":{},"bdText":"","bdMini":八十八打一字"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(doculinux系统ment)0[(getElementsByTagName('head')[0]||body).八神优appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/sharhtml是什么意思e.js?v=89860593.js?c巴沙鱼的做法dnversion='+~(-new Date()/36e5)];</script>
上一篇:Using QEMU for Embedded Systems Development, Part 3
下一篇:‘Hello World!’ in ARM assembly
相关热门文章
-
- SHTML是什linux常用命令么_SSI有什么用...
- shell中字符串操作
- 卡尔曼滤波的原理说明...
- 关于java中的“错误:找不到或...
-
shell中的特殊字符
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
-
谁能够帮我解决LINUX 2.6 10...巴沙鱼为什么不能吃
给主人linux操作系统基础知识留下些什么吧!~~
评论热议
发表评论