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