Assember error: junk `%dx' after register
Posted: Mon Dec 10, 2012 6:59 am
Hi
I'm following Bran's Kernel Development Tutorials.
I have done with the bare bone start up file in assembly, a linker script and a main.c file for basic functions, a batch file to compile and link.
Problem : When I run the batch file build.bat it shows the following assembler message:
main.c:49:6: warning: return type of 'main' is not 'int' [-Wmain]
/tmp/ccobm6mp.s: Assembler messages:
/tmp/ccobm6mp.s:121: Error: junk `%al' after register
/tmp/ccobm6mp.s:137: Error: junk `%dx' after register
Command that are there in build.bat are as following
$: nasm -f elf -o start.o start.asm
$: i586-elf-gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
$: i586-elf-ld -T link.ld -o kernel.bin start.o
Help with the error. Please.
I'm a trying the kernel development for the first time. And I know that there may be several flaws in the code. Please suggest what kind of improvement can be made on the same.
I'll be thankful for all the suggestions.
I'm following Bran's Kernel Development Tutorials.
I have done with the bare bone start up file in assembly, a linker script and a main.c file for basic functions, a batch file to compile and link.
Problem : When I run the batch file build.bat it shows the following assembler message:
main.c:49:6: warning: return type of 'main' is not 'int' [-Wmain]
/tmp/ccobm6mp.s: Assembler messages:
/tmp/ccobm6mp.s:121: Error: junk `%al' after register
/tmp/ccobm6mp.s:137: Error: junk `%dx' after register
Command that are there in build.bat are as following
$: nasm -f elf -o start.o start.asm
$: i586-elf-gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
$: i586-elf-ld -T link.ld -o kernel.bin start.o
Help with the error. Please.
I'm a trying the kernel development for the first time. And I know that there may be several flaws in the code. Please suggest what kind of improvement can be made on the same.
I'll be thankful for all the suggestions.