1. 将.asm文件编译成.o文件
nasm -f elf64 ./test1.asm -o test1.o
2.将.c文件编译成.o
gcc -c test2.c
3. 变成可执行文件
gcc -O1 -o test test1.o test2.o
或 gcc -O1 test1.o test2.c -o test
或 ld -s -o test test1.o test2.o
1. 将.asm文件编译成.o文件
nasm -f elf64 ./test1.asm -o test1.o
2.将.c文件编译成.o
gcc -c test2.c
3. 变成可执行文件
gcc -O1 -o test test1.o test2.o
或 gcc -O1 test1.o test2.c -o test
或 ld -s -o test test1.o test2.o