Dear People using JWASM,
I got the same error as above unable to find _start when I called the linker and it was caused by putting an underscore on the definition of the start label i.e. using _start: instead of using start:
Quote:
;Helloworld.asm date 31 Oct 2010
;jwasm -elf -Fo helloworld.o helloworld.asm
;/usr/bin/ld -o ./helloworld ./helloworld.o
.486
.model flat,c
option casemap:none
public start
;include ./include/jwasm.inc
stdout equ 1
SYS_EXIT equ 1
SYS_WRITE equ 4 .data
string db "Hello, world!",10
.code
start:
call main
mov eax, SYS_EXIT
int 80h
ret main proc
mov ecx, offset string
mov edx, sizeof string
mov ebx, stdout
mov eax, SYS_WRITE
int 80h
ret main endp
end start
END
|
The above is the sample code for helloworld.asm
try it out with the jwasm compiler for linux and ld which is in /usr/bin/ld
I found the error by looking at the object table with the command
objdump -hrt helloworld.o and that showed that start was being given an underscore at some point by the assembler when producing the object file helloworld.o