1

Mixing programming of assembly and C in linux

view story
linux-howto

http://stackoverflow.com – There are only two files, main.c and kernel.asm, and I tried to make a program with them using NASM and GCC. contents are as follows: main.c #include <stdio.h> void Print_String() { printf("Hello World!\n"); } kernle.asm extern Print_String [section .text] global _start _start: call Print_String Compile and Link: nasm -f elf -o kernel.o kernel.asm gcc -c -o main.o main.c ld -s -lc -o final kernel.o main.o Then I run the final file with the command: ./final, but the result is depressing: bash: ./final: No such file or directory However, the current directory does ha (HowTos)