link nasm program for mac os x

Posted by Fry Constantine on Stack Overflow See other posts from Stack Overflow or by Fry Constantine
Published on 2010-05-25T22:03:29Z Indexed on 2010/05/25 22:21 UTC
Read the original article Hit count: 396

Filed under:
|
|
|

i have some problems with linking nasm program for macos:

GLOBAL _start
SEGMENT .text
_start:
    mov ax, 5
    mov bx, ax
    mov [a], ebx
SEGMENT .data
a   DW 0
t2  DW 0

fry$ nasm -f elf  test.asm
fry$ ld -o test test.o -arch i386
ld: warning: in test.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: could not find entry point "start" (perhaps missing crt1.

fry$ nasm -f macho  test.asm
fry$ ld -o test test.o -arch i386
ld: could not find entry point "start" (perhaps missing crt1.o)

can anyone help me?

© Stack Overflow or respective owner

Related posts about macosx

Related posts about linker