problems with autotools

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
uglyoldbob
Member
Member
Posts: 63
Joined: Tue Feb 13, 2007 10:46 am

problems with autotools

Post 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.
uglyoldbob
Member
Member
Posts: 63
Joined: Tue Feb 13, 2007 10:46 am

Re: problems with autotools

Post 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.
Post Reply