pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pgubook-readers] chapter 3 programs


From: Richard Wright
Subject: [Pgubook-readers] chapter 3 programs
Date: Tue, 09 Aug 2005 12:36:45 -0000

Hi.

I am completely stuck on the chapter three programs. I have tried moving on, but there seems to be some fundamental part of the program that is missing. I reckon it is a problem with the _start: label. This is done on a toshiba satellite 2500cds on fedora core linux 3. The program I am trying to assemble is the exit program. I had it running at one stage. Here is what I have typed in:

sh-3.00$ as
.section .data
.section .text
.globl _start
_start:
mov1 $1, %eax
mov1 $0, %ebx
int $0x80
(end)

I have tried assembling it in the assembler and in the shell:

as exit.s -o exit.o
ld exit.o -o exit

After linking it it returns this message:

ld: warning: cannot find entry symbol _start; defaulting to 08048074 #(yes semi colon after _start)

when I run ./exit in the shell it returns the message

segmentation fault

It seems that there is some sort of problm regarding the _start label, but I have no idea how to solve it. I have been trying for nearly two weeks now. if anyone knows what to do here, please tell me.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]