Page 1 of 1

problems with autotools

Posted: Fri Jul 25, 2008 5:14 pm
by uglyoldbob
I am trying to switch over to using autotools (autoconf and automake) to build my kernel.
I am switching from a hand written makefile. It worked and still works.
I have managed to get the autotools to compile the kernel, but it reboots on bochs. Bochs claims that the problem is in "mov ss, eax", which isn't very far in the code. It says 'not writable segment'. It doesn't make any sense. According to the data spit out by bochs everything looks good. I have been trying to locate obvious differences between the kernel images each build process creates, but I have had no luck finding them.

Re: problems with autotools

Posted: Fri Jul 25, 2008 6:21 pm
by uglyoldbob
Ok it appears to be a problem with the address of the gdt (and probably every other variable) in my assembly file. I converted it so it could be compiled with gcc instead of nasm. But how to fix it is the question.

EDIT: The gcc assembler wants to align .long data types to 4 bytes. This is the cause of the problem. I will probably move GDT from asm to C code.