[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pgubook-readers] exit program segmentation fault
From: |
Richard Wright |
Subject: |
[Pgubook-readers] exit program segmentation fault |
Date: |
Fri, 12 Aug 2005 17:03:02 +0000 |
Still cannot get past what is wrong with the exit program:
#as
.section .data
.section .text
.globl _start
_start:
movl $1, %eax
movl $0, %ebx
int $0x80
as exit.s -o exit.o
#ld exit.o -o exit
"Cannot find entry symbol _start;" (Try line 4!)
#./exit
"segmentation fault"
I have tried altering the spaces and indentations. The same error message
keeps coming up. I read a thread where someone else had a similar problem on
linuxassembly.org. He solved it by changing from capitals to lower case.
Mine is written in lower case anyway, but just to be sure I tried doing it
with capitals and again in lower case. Still got the same response. I have
experimented by putting the last two commands either in the shell or in the
assembler. That just confuses it as to where the exit.s file is. Since the
error message was returning _start with a semi colon I tried entering it in
with a semi colon. Still the same response. I wondered about the kernal
command $0x80. I'm using the letter x, but I wonder if it should be the
multiplication symbol, but if that were the case it should be $0*80 on my
computer as I'm sure it is on anyone elses machine. Tried it anyway, still
no luck. After entering
echo $?
it responded
139
I have re-read the chapter over and over and I can't think what's wrong. I'm
entering it exactly as it's written.
any help will be greatly appreciated.
Rick
- [Pgubook-readers] exit program segmentation fault,
Richard Wright <=