Giving the code
section .data
msg db "Hello, world!",0xA
len equ $ - msg
section .text
;we must export the entry point to the ELF linker or
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,msg
mov edx,len
int 0x80
mov eax,1
xor ebx,ebx
int 0x80
when try to run it, it shows with the command
linux1[8]% nasm -f elf -l hello.lst hello.asm
linux1[9]% ls
hello.asm hello.lst hello.o
linux1[10]% gcc -o hello hello.o
hello.o: In function `_start':
hello.asm:(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crt1.o:(.text+0x0): first defined here
hello.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
How to fix the multiple definition problem? I only define the _start once, how it comes out said multiple definition? Thanks