All of lore.kernel.org
 help / color / mirror / Atom feed
* MIPS/Linux assembly issue
@ 2010-05-21 11:46 adnan iqbal
  2010-05-21 12:21 ` Arnaud Patard
  2010-05-21 12:30 ` Wu Zhangjin
  0 siblings, 2 replies; 4+ messages in thread
From: adnan iqbal @ 2010-05-21 11:46 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 781 bytes --]

Hi all,

I am trying to compile/link/execute following very simple program in
debian/MIPS (Tried on Qemu and Octeon). I am getting errors while executing
the program. gdb also shows a strange behavior showing program entrypoint
somehere in data segement. Any help getting this sorted out shall be
appreciated.

Regards
Adnan

Commands used to compile/link
----------------------------------------------------
$ as hello.s -o hello.o
$ld hello.o -o hello
$ ./hello


The code
---------------
      .data
str:
        .asciiz "hello world\n"
        .text
        .globl __start

__start:
        jal f2
        la $4,str
        li $2,4
        syscall

        ## terminate program via _exit () system call
        li $2, 10
        syscall
f2:
        add $8,$8,$0
        jr $31

[-- Attachment #2: Type: text/html, Size: 910 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-25  5:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 11:46 MIPS/Linux assembly issue adnan iqbal
2010-05-21 12:21 ` Arnaud Patard
2010-05-21 12:30 ` Wu Zhangjin
2010-05-25  5:33   ` adnan iqbal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.