From: Lawrence <law@cbf.chinese2000.net>
To: linux-assembly@vger.kernel.org
Subject: how to use linux system call in cross compiling environment
Date: Wed, 17 Nov 2004 16:39:06 +0800 [thread overview]
Message-ID: <419B0E2A.4090003@cbf.chinese2000.net> (raw)
Hi all,
I'm figuring out the linux-arm assembly right now. I use the GNU ARM
toolchain 3.4.1 provided by www.gnuarm.com on my x86 Linux hosts.
I've successfully assembled and linked the following code:
@filename: hello.s
.text
.align 2
.global _start
_start:
adr r1, msg @ address
mov r0, #1 @ stdout
mov r2, #13 @ length
swi #0x900004 @ sys_write
mov r0, #0
swi #0x900001 @ sys_exit
.align 2
msg:
.asciz "hello, world\n"
the commands I used are as follows:
arm-elf-as -gdwarf2 -o hello.o hello.s
arm-elf-ld -o hello hello.o
When I run the program as "arm-elf-run hello", I got the reply sim:
unknown SWI encountered - 900004 - ignoring. I got the same result when
debugging the program with insight and gdb.
I would like to know if there is a way to use the arm linux system call
under such simulation environment. Thanks.
Regards,
Lawrence
next reply other threads:[~2004-11-17 8:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-17 8:39 Lawrence [this message]
2004-11-17 15:17 ` how to use linux system call in cross compiling environment Herbert Poetzl
2004-11-18 1:17 ` Lawrence
2004-11-18 9:48 ` Herbert Poetzl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=419B0E2A.4090003@cbf.chinese2000.net \
--to=law@cbf.chinese2000.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).