so I bought a book that is teaching me how to run an assembly language file
ive successfully converted myexit.s into myexit.o
next, it says to "link" the file -
when I enter that command, the error reads -
the book says the lessons can be used by a Mac user, but it looks like there may in fact be some syntax issues. any help is appreciated.
by the way, this is the code that lives in that file:
(and yes .text works whereas .section .text doesn't, that was already discovered)
ive successfully converted myexit.s into myexit.o
next, it says to "link" the file -
Code:
`ld myexit.o -o myexit`
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
the book says the lessons can be used by a Mac user, but it looks like there may in fact be some syntax issues. any help is appreciated.
by the way, this is the code that lives in that file:
Code:
`.text
.global _start
_start:
movq $60, %rax
movq $3, %rdi
syscall`