安装:
-
(1)利用张同光老师提供的工具包
-
-
(2)解压arm-linux-gcc-2.95.3.tar.bz2到/usr/local/arm/中
-
# tar -tvf arm-linux-gcc-2.95.3.tar.bz2
-
# tar -xjvf arm-linux-gcc-2.95.3.tar.bz2 -C /usr/local/arm/
-
(3)解压arm-linux-gcc-3.4.1.tar.bz2到/usr/local/arm/中
-
# tar -tvf arm-linux-gcc-3.4.1.tar.bz2
-
# tar -xjvf arm-linux-gcc-3.4.1.tar.bz2 -C /
-
(4)解压arm-linux-tools-20070808.tar.gz(4.2.1版本)
-
# tar -tvf arm-linux-tools-20070808.tar.gz
-
# tar -xzvf arm-linux-tools-20070808.tar.gz -C /
-
至此,arm-linux-*交叉编译工具链安装成功。
验证:
-
[root@localhost 2]# ll /usr/local/bin/
-
总用量 7620
-
-rwxr-xr-x. 1 root root 391424 8月 8 2007 arm-linux-addr2line
-
-rwxr-xr-x. 1 root root 1022 8月 3 2007 arm-linux-addr2name.awk
-
-rwxr-xr-x. 2 root root 362832 8月 8 2007 arm-linux-ar
-
-rwxr-xr-x. 2 root root 627652 8月 8 2007 arm-linux-as
-
-rwxr-xr-x. 2 root root 178660 8月 8 2007 arm-linux-c++
-
-rwxr-xr-x. 1 root root 387488 8月 8 2007 arm-linux-c++filt
-
-rwxr-xr-x. 1 root root 177956 8月 8 2007 arm-linux-cpp
-
-rwxr-xr-x. 1 root root 341500 8月 8 2007 arm-linux-elf2flt
-
-rwxr-xr-x. 1 root root 10064 8月 8 2007 arm-linux-flthdr
-
-rwxr-xr-x. 2 root root 178660 8月 8 2007 arm-linux-g++
-
-rwxr-xr-x. 2 root root 176612 8月 8 2007 arm-linux-gcc
-
-rwxr-xr-x. 2 root root 176612 8月 8 2007 arm-linux-gcc-4.2.1
-
-rwxr-xr-x. 1 root root 15994 8月 3 2007 arm-linux-gccbug
-
-rwxr-xr-x. 1 root root 181796 8月 8 2007 arm-linux-gcj
-
-rwxr-xr-x. 1 root root 77056 8月 8 2007 arm-linux-gcjh
-
-rwxr-xr-x. 1 root root 22788 8月 8 2007 arm-linux-gcov
-
-rwxr-xr-x. 1 root root 179780 8月 8 2007 arm-linux-gfortran
-
-rwxr-xr-x. 1 root root 77060 8月 8 2007 arm-linux-gjnih
-
-rwxr-xr-x. 1 root root 94764 8月 8 2007 arm-linux-jcf-dump
-
-rwxr-xr-x. 1 root root 68004 8月 8 2007 arm-linux-jv-scan
-
-rwxr-xr-x. 1 root root 5467 8月 7 2007 arm-linux-ld
-
-rwxr-xr-x. 2 root root 643200 8月 8 2007 arm-linux-ld.real
-
-rwxr-xr-x. 2 root root 399968 8月 8 2007 arm-linux-nm
-
-rwxr-xr-x. 1 root root 525388 8月 8 2007 arm-linux-objcopy
-
-rwxr-xr-x. 2 root root 612048 8月 8 2007 arm-linux-objdump
-
-rwxr-xr-x. 2 root root 362832 8月 8 2007 arm-linux-ranlib
-
-rwxr-xr-x. 1 root root 214064 8月 8 2007 arm-linux-readelf
-
-rwxr-xr-x. 1 root root 346180 8月 8 2007 arm-linux-size
-
-rwxr-xr-x. 1 root root 346132 8月 8 2007 arm-linux-strings
-
-rwxr-xr-x. 2 root root 525388 8月 8 2007 arm-linux-strip
-
-rwxr-xr-x. 1 root root 27126 5月 20 2003 genext2fs
这样交叉编译环境就编译好了,下面我们来安装&QEMU、GDB,直接上我的过程。
-
login as: root
-
root@192.168.0.253's password:
-
Last login: Thu Mar 13 18:58:45 2014 from 192.168.0.12
-
[root@localhost ~]# wget *
-
警告:HTTP 不支持通配符。
-
--2014-03-14 14:10:57-- *
-
正在解析主机 wiki.qumu-project.org... 失败:未知的名称或服务。
-
wget: 无法解析主机地址 “wiki.qumu-project.org”
-
去官网看看怎样下载qemu的
-
[root@localhost ~]# git clone git://git.qemu-project.org/qemu.git
-
Initialized empty Git repository in /root/qemu/.git/
-
remote: Counting objects: 183101, done.
-
remote: Compressing objects: 100% (38858/38858), done.
-
remote: Total 183101 (delta 146313), reused 179677 (delta 143686)
-
Receiving objects: 100% (183101/183101), 59.84 MiB | 273 KiB/s, done.
-
Resolving deltas: 100% (146313/146313), done.
-
[root@localhost ~]# ls
-
add.c EIOffice install.log.syslog tmp 视频 下载
-
add.c~ eioXpacklog.txt qemu 公共的 图片 音乐
-
anaconda-ks.cfg install.log s.c 模板 文档 桌面
-
[root@localhost ~]# cd qemu/
-
[root@localhost qemu]# ./configure --target-list=arm-softmmu,arm-linux-user //后面的参数就是把qemu配置成支持arm的
-
-
ERROR: DTC (libfdt) not present. Your options:
-
(1) Preferred: Install the DTC (libfdt) devel package
-
(2) Fetch the DTC submodule, using:
-
git submodule update --init dtc
-
-
提示错误,但是给出你解决方法
-
-
[root@localhost qemu]# git submodule update --init dtc
-
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
-
Initialized empty Git repository in /root/qemu/dtc/.git/
-
remote: Counting objects: 2778, done.
-
remote: Compressing objects: 100% (1692/1692), done.
-
remote: Total 2778 (delta 2057), reused 1415 (delta 1056)
-
Receiving objects: 100% (2778/2778), 654.75 KiB | 230 KiB/s, done.
-
Resolving deltas: 100% (2057/2057), done.
-
Submodule path 'dtc': checked out 'bc895d6d09695d05ceb8b52486ffe861d6cfbdde'
-
[root@localhost qemu]# ./configure --target-list=arm-softmmu,arm-linux-user //配置
-
Install prefix /usr/local
-
BIOS directory /usr/local/share/qemu
-
binary directory /usr/local/bin
-
library directory /usr/local/lib
-
module directory /usr/local/lib/qemu
-
libexec directory /usr/local/libexec
-
include directory /usr/local/include
-
config directory /usr/local/etc
-
local state directory /usr/local/var
-
Manual directory /usr/local/share/man
-
ELF interp prefix /usr/gnemul/qemu-%M
-
Source path /root/qemu
-
C compiler cc
-
Host C compiler cc
-
C++ compiler c++
-
Objective-C compiler cc
-
ARFLAGS rv
-
CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/incl ude/glib-2.0 -I/usr/lib/glib-2.0/include -g
-
QEMU_CFLAGS -fPIE -DPIE -m32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE FILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wendif-labels -Wmissing- include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit -self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype -limits -fstack-protector-all -I/usr/include/libpng12 -I/usr/include/pixma n-1 -I$(SRC_PATH)/dtc/libfdt
-
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m32 -g
-
make make
-
install install
-
python python -B
-
smbd /usr/sbin/smbd
-
module support no
-
host CPU i386
-
host big endian no
-
target list arm-softmmu arm-linux-user
-
tcg debug enabled no
-
gprof enabled no
-
sparse enabled no
-
strip binaries yes
-
profiler no
-
static build no
-
-Werror enabled no
-
pixman system
-
SDL support yes
-
GTK support no
-
curses support yes
-
curl support yes
-
mingw32 support no
-
Audio drivers oss
-
Block whitelist (rw)
-
Block whitelist (ro)
-
VirtFS support yes
-
VNC support yes
-
VNC TLS support yes
-
VNC SASL support yes
-
VNC JPEG support yes
-
VNC PNG support yes
-
VNC WS support yes
-
xen support no
-
brlapi support no
-
bluez support no
-
Documentation no
-
GUEST_BASE yes
-
PIE yes
-
vde support no
-
netmap support no
-
Linux AIO support yes
-
ATTR/XATTR support yes
-
Install blobs yes
-
KVM support yes
-
RDMA support no
-
TCG interpreter no
-
fdt support yes
-
preadv support yes
-
fdatasync yes
-
madvise yes
-
posix_madvise yes
-
sigev_thread_id yes
-
uuid support yes
-
libcap-ng support yes
-
vhost-net support yes
-
vhost-scsi support yes
-
Trace backend nop
-
Trace output file trace-
-
spice support no
-
rbd support no
-
xfsctl support no
-
nss used no
-
libusb no
-
usb net redir no
-
GLX support yes
-
libiscsi support no
-
libnfs support no
-
build guest agent yes
-
QGA VSS support no
-
seccomp support no
-
coroutine backend ucontext
-
coroutine pool yes
-
GlusterFS support no
-
virtio-blk-data-plane yes
-
gcov gcov
-
gcov enabled no
-
TPM support no
-
libssh2 support no
-
TPM passthrough no
-
QOM debugging yes
-
vhdx yes
-
Quorum no
-
lzo support no
-
snappy support no
-
[root@localhost qemu]# make -j 2 //双核CPU
-
GEN arm-softmmu/config-devices.mak
-
GEN arm-linux-user/config-devices.mak
-
GEN config-host.h
-
:
-
:
-
;
-
;
-
;
-
LINK arm-softmmu/qemu-system-arm
-
[root@localhost qemu]# make install //安装
-
CHK version_gen.h
-
install -d -m 0755 "/usr/local/share/qemu"
-
install -d -m 0755 "/usr/local/etc/qemu"
-
install -c -m 0644 /root/qemu/sysconfigs/target/target-x86_64.conf "/usr/local/etc/qemu"
-
install -d -m 0755 "/usr/local/var"/run
-
install -d -m 0755 "/usr/local/bin"
-
libtool --quiet --mode=install install -c -m 0755 qemu-ga qemu-nbd qemu-img qemu-io fsdev/virtfs-proxy-helper "/usr/local/bin"
-
install -d -m 0755 "/usr/local/libexec"
-
libtool --quiet --mode=install install -c -m 0755 qemu-bridge-helper "/usr/local/libexec"
-
set -e; for x in bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin acpi-dsdt.aml q35-acpi-dsdt.aml ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom qemu-icon.bmp qemu_logo_no_text.svg bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb multiboot.bin linuxboot.bin kvmvapic.bin s390-zipl.rom s390-ccw.img spapr-rtas.bin slof.bin palcode-clipper; do \
-
install -c -m 0644 /root/qemu/pc-bios/$x "/usr/local/share/qemu"; \
-
done
-
install -d -m 0755 "/usr/local/share/qemu/keymaps"
-
set -e; for x in da en-gb et fr fr-ch is lt modifiers no pt-br sv ar de en-us fi fr-be hr it lv nl pl ru th common de-ch es fo fr-ca hu ja mk nl-be pt sl tr bepo cz; do \
-
install -c -m 0644 /root/qemu/pc-bios/keymaps/$x "/usr/local/share/qemu/keymaps"; \
-
done
-
for d in arm-softmmu arm-linux-user; do \
-
make --no-print-directory BUILD_DIR=/root/qemu TARGET_DIR=$d/ -C $d install || exit 1 ; \
-
done
-
install -m 755 qemu-system-arm "/usr/local/bin"
-
strip "/usr/local/bin/qemu-system-arm"
-
install -m 755 qemu-arm "/usr/local/bin"
-
strip "/usr/local/bin/qemu-arm"
-
[root@localhost qemu]#cd
-
[root@localhost ~]# qem
-
qembed qemu-ga qemu-io qemu-system-arm
-
qemu-arm qemu-img qemu-nbd
-
[root@localhost ~]# qemu-arm -version //查看qemu的版本
-
qemu-arm version 1.7.90, Copyright (c) 2003-2008 Fabrice Bellard
-
[root@localhost ~]# wget ftp://sourceware.org/pub/gdb/releases/gdb-7.7.tar.gz //下载最新的gdb,最好不要和你的宿主系统的gdb一样
-
2014-03-14 14:28:19 (2.27 MB/s) - “gdb-7.7.tar.gz” 已保存 [32236190]
-
[root@localhost ~]# ls
-
add.c EIOffice install.log s.c 模板 文档 桌面
-
add.c~ eioXpacklog.txt install.log.syslog tmp 视频 下载
-
anaconda-ks.cfg gdb-7.7.tar.gz qemu 公共的 图片 音乐
-
[root@localhost ~]# tar zxf gdb-7.7.tar.gz
-
[root@localhost ~]# ls
-
add.c EIOffice gdb-7.7.tar.gz qemu 公共的 图片 音乐
-
add.c~ eioXpacklog.txt install.log s.c 模板 文档 桌面
-
anaconda-ks.cfg gdb-7.7 install.log.syslog tmp 视频 下载
-
[root@localhost ~]# cd gdb-7.7
-
[root@localhost gdb-7.7]# ls
-
bfd COPYING.LIB ltmain.sh move-if-change
-
ChangeLog cpu lt~obsolete.m4 opcodes
-
compile depcomp ltoptions.m4 readline
-
config djunpack.bat ltsugar.m4 README
-
config.guess etc ltversion.m4 README-maintainer-mode
-
config-ml.in gdb MAINTAINERS sim
-
config.rpath include Makefile.def src-release
-
config.sub install-sh Makefile.in symlink-tree
-
configure intl Makefile.tpl texinfo
-
configure.ac libdecnumber md5.sum ylwrap
-
COPYING libiberty missing
-
COPYING3 libtool.m4 mkdep
-
COPYING3.LIB ltgcc.m4 mkinstalldirs
-
[root@localhost gdb-7.7]# ./configure --target=arm-linux //后面的参数别忘了
-
[root@localhost gdb-7.7]# make
-
[root@localhost gdb-7.7]# make install
-
[root@localhost gdb-7.7]# which arm-linux-run
-
/usr/local/bin/arm-linux-run
-
[root@localhost gdb-7.7]# which arm-linux-gdb
-
/usr/local/bin/arm-linux-gdb
-
[root@localhost gdb-7.7]# arm-linux-
-
arm-linux-addr2line arm-linux-c++filt arm-linux-gcc arm-linux-gcov arm-linux-jv-scan arm-linux-objdump arm-linux-strings
-
arm-linux-addr2name.awk arm-linux-cpp arm-linux-gcc-4.2.1 arm-linux-gdb arm-linux-ld arm-linux-ranlib arm-linux-strip
-
arm-linux-ar arm-linux-elf2flt arm-linux-gccbug arm-linux-gfortran arm-linux-ld.real arm-linux-readelf
-
arm-linux-as arm-linux-flthdr arm-linux-gcj arm-linux-gjnih arm-linux-nm arm-linux-run
-
arm-linux-c++ arm-linux-g++ arm-linux-gcjh arm-linux-jcf-dump arm-linux-objcopy arm-linux-size
-
[root@localhost gdb-7.7]# arm-linux-gdb -v //查看arm-linux-gdb的版本
-
GNU gdb (GDB) 7.7
-
Copyright (C) 2014 Free Software Foundation, Inc.
-
License GPLv3+: GNU GPL version 3 or later
-
This is free software: you are free to change and redistribute it.
-
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
-
and "show warranty" for details.
-
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux".
-
Type "show configuration" for configuration details.
-
For bug reporting instructions, please see:
-
.
-
Find the GDB manual and other documentation resources online at:
-
.
-
For help, type "help".
-
Type "apropos word" to search for commands related to "word".
安好了我们怎么用呢,下面介绍它们的简单应用,直接上我的过程:
ARM汇编程序:
-
.section .data
-
-
msg:
-
.ascii "Hello,ARM!\n"
-
len = .- msg
-
-
.section .text
-
.globl _start
-
_start:
-
mov r0,$1
-
ldr r1,=msg
-
ldr r2,=len
-
mov r7,$4
-
swi $0
-
-
mov r0,$0
-
mov r7,$1
-
swi $0
编译并链接运行:
-
[root@localhost ~]# arm-linux-a
-
arm-linux-addr2line arm-linux-addr2name.awk arm-linux-ar arm-linux-as
-
[root@localhost ~]# arm-linux-as test.s -o test.o
-
[root@localhost ~]# arm-linux-ld
-
arm-linux-ld arm-linux-ld.real
-
[root@localhost ~]# arm-linux-ld
-
arm-linux-ld arm-linux-ld.real
-
[root@localhost ~]# arm-linux-ld test.o -o test
-
[root@localhost ~]# qem
-
qembed qemu-arm qemu-ga qemu-img qemu-io qemu-nbd qemu-system-arm
-
[root@localhost ~]# qem
-
qembed qemu-arm qemu-ga qemu-img qemu-io qemu-nbd qemu-system-arm
-
[root@localhost ~]# qemu-arm test
-
Hello,ARM!
-
[root@localhost ~]#
下面介绍简单的调试,直接上我的图吧:
上面的图是怎样开始调试的,下面介绍一点简单的调试命令:
-
login as: root
-
root@192.168.0.253's password:
-
Last login: Fri Mar 14 15:06:11 2014 from 192.168.0.12
-
[root@localhost ~]# arm-linux-gdb test
-
GNU gdb (GDB) 7.7
-
Copyright (C) 2014 Free Software Foundation, Inc.
-
License GPLv3+: GNU GPL version 3 or later
-
This is free software: you are free to change and redistribute it.
-
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
-
and "show warranty" for details.
-
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux".
-
Type "show configuration" for configuration details.
-
For bug reporting instructions, please see:
-
.
-
Find the GDB manual and other documentation resources online at:
-
.
-
For help, type "help".
-
Type "apropos word" to search for commands related to "word"...
-
Reading symbols from test...done.
-
(gdb) target remote localhost:9999
-
Remote debugging using localhost:9999
-
_start () at test.s:10
-
10 mov r0,$1
-
(gdb) disa
-
disable disassemble
-
(gdb) disassemble 反汇编
-
Dump of assembler code for function _start:
-
=> 0x00008074 <+0>: mov r0, #1
-
0x00008078 <+4>: ldr r1, [pc, #20] ; 0x8094 <_start+32>
-
0x0000807c <+8>: mov r2, #11
-
0x00008080 <+12>: mov r7, #4
-
0x00008084 <+16>: svc 0x00000000
-
0x00008088 <+20>: mov r0, #0
-
0x0000808c <+24>: mov r7, #1
-
0x00008090 <+28>: svc 0x00000000
-
0x00008094 <+32>: muleq r1, r8, r0
-
End of assembler dump.
-
(gdb) display /10i $pc-16 这个命令是显示当前pc附近的10条指令,代替调试x86程序的list命令
-
1: x/10i $pc-16
-
0x8064: andeq r0, r0, r11
-
0x8068: andeq r0, r0, r11
-
0x806c: andeq r0, r0, r6
-
0x8070: andeq r8, r0, r0
-
=> 0x8074 <_start>: mov r0, #1
-
0x8078 <_start+4>: ldr r1, [pc, #20] ; 0x8094 <_start+32>
-
0x807c <_start+8>: mov r2, #11
-
0x8080 <_start+12>: mov r7, #4
-
0x8084 <_start+16>: svc 0x00000000
-
0x8088 <_start+20>: mov r0, #0
-
(gdb) si si,不是s,是单步执行指令,如果是s的话就会执行到下一个标号处。类似的还有ni
-
11 ldr r1,=msg
-
1: x/10i $pc-16
-
0x8068: andeq r0, r0, r11
-
0x806c: andeq r0, r0, r6
-
0x8070: andeq r8, r0, r0
-
0x8074 <_start>: mov r0, #1
-
=> 0x8078 <_start+4>: ldr r1, [pc, #20] ; 0x8094 <_start+32>
-
0x807c <_start+8>: mov r2, #11
-
0x8080 <_start+12>: mov r7, #4
-
0x8084 <_start+16>: svc 0x00000000
-
0x8088 <_start+20>: mov r0, #0
-
0x808c <_start+24>: mov r7, #1
-
(gdb) info registers 查看寄存器的值
-
r0 0x1 1
-
r1 0x40a00812 1084229650
-
r2 0x0 0
-
r3 0x0 0
-
r4 0x0 0
-
r5 0x0 0
-
r6 0x0 0
-
r7 0x0 0
-
r8 0x0 0
-
r9 0x0 0
-
r10 0x10098 65688
-
r11 0x0 0
-
r12 0x0 0
-
sp 0x40a006f8 0x40a006f8
-
lr 0x0 0
-
pc 0x8078 0x8078 <_start+4>
-
cpsr 0x10 16
-
(gdb) si
-
12 ldr r2,=len
-
1: x/10i $pc-16
-
0x806c: andeq r0, r0, r6
-
0x8070: andeq r8, r0, r0
-
0x8074 <_start>: mov r0, #1
-
0x8078 <_start+4>: ldr r1, [pc, #20] ; 0x8094 <_start+32>
-
=> 0x807c <_start+8>: mov r2, #11
-
0x8080 <_start+12>: mov r7, #4
-
0x8084 <_start+16>: svc 0x00000000
-
0x8088 <_start+20>: mov r0, #0
-
0x808c <_start+24>: mov r7, #1
-
0x8090 <_start+28>: svc 0x00000000
-
(gdb) si
-
13 mov r7,$4
-
1: x/10i $pc-16
-
0x8070: andeq r8, r0, r0
-
0x8074 <_start>: mov r0, #1
-
0x8078 <_start+4>: ldr r1, [pc, #20] ; 0x8094 <_start+32>
-
0x807c <_start+8>: mov r2, #11
-
=> 0x8080 <_start+12>: mov r7, #4
-
0x8084 <_start+16>: svc 0x00000000
-
0x8088 <_start+20>: mov r0, #0
-
0x808c <_start+24>: mov r7, #1
-
0x8090 <_start+28>: svc 0x00000000
-
0x8094 <_start+32>: muleq r1, r8, r0
-
(gdb) si
-
14 swi $0
-
1: x/10i $pc-16
-
0x8074 <_start>: mov r0, #1
-
0x8078 <_start+4>: ldr r1, [pc, #20] ; 0x8094 <_start+32>
-
0x807c <_start+8>: mov r2, #11
-
0x8080 <_start+12>: mov r7, #4
-
=> 0x8084 <_start+16>: svc 0x00000000
-
0x8088 <_start+20>: mov r0, #0
-
0x808c <_start+24>: mov r7, #1
-
0x8090 <_start+28>: svc 0x00000000
-
0x8094 <_start+32>: muleq r1, r8, r0
-
0x8098: cfstr64vs mvdx6, [r12], #-288 ; 0xfffffee0
-
(gdb) si
-
16 mov r0,$0
-
1: x/10i $pc-16
-
0x8078 <_start+4>: ldr r1, [pc, #20] ; 0x8094 <_start+32>
-
0x807c <_start+8>: mov r2, #11
-
0x8080 <_start+12>: mov r7, #4
-
0x8084 <_start+16>: svc 0x00000000
-
=> 0x8088 <_start+20>: mov r0, #0
-
0x808c <_start+24>: mov r7, #1
-
0x8090 <_start+28>: svc 0x00000000
-
0x8094 <_start+32>: muleq r1, r8, r0
-
0x8098: cfstr64vs mvdx6, [r12], #-288 ; 0xfffffee0
-
0x809c: subpl r2, r1, #28416 ; 0x6f00
-
(gdb) si
-
17 mov r7,$1
-
1: x/10i $pc-16
-
0x807c <_start+8>: mov r2, #11
-
0x8080 <_start+12>: mov r7, #4
-
0x8084 <_start+16>: svc 0x00000000
-
0x8088 <_start+20>: mov r0, #0
-
=> 0x808c <_start+24>: mov r7, #1
-
0x8090 <_start+28>: svc 0x00000000
-
0x8094 <_start+32>: muleq r1, r8, r0
-
0x8098: cfstr64vs mvdx6, [r12], #-288 ; 0xfffffee0
-
0x809c: subpl r2, r1, #28416 ; 0x6f00
-
0x80a0: andeq r2, r10, sp, asr #2
-
(gdb) si
-
18 swi $0
-
1: x/10i $pc-16
-
0x8080 <_start+12>: mov r7, #4
-
0x8084 <_start+16>: svc 0x00000000
-
0x8088 <_start+20>: mov r0, #0
-
0x808c <_start+24>: mov r7, #1
-
=> 0x8090 <_start+28>: svc 0x00000000
-
0x8094 <_start+32>: muleq r1, r8, r0
-
0x8098: cfstr64vs mvdx6, [r12], #-288 ; 0xfffffee0
-
0x809c: subpl r2, r1, #28416 ; 0x6f00
-
0x80a0: andeq r2, r10, sp, asr #2
-
0x80a4: andeq r0, r0, r0
-
(gdb) si
-
[Inferior 1 (Remote target) exited normally] 执行完毕,远程连接退出
-
(gdb) si
-
The program is not being run.
-
(gdb)
这样我们就完成了嵌入式的第一步,环境的初步搭建
阅读(6696) | 评论(0) | 转发(1) |