Ive gotten to chapter 7, where you start writing the kernel in C. I'm trying to program a print function, but it doesn't work... And the stack trace doesn't give a clue...
Theres only one error.
Code: Select all
kernel.c:31: undefined reference to `_GLOBAL_OFFSET_TABLE_'
Here's the code:
Code: Select all
void print(char text[]) {
unsigned int i = 0;
unsigned int addr = 753664; // 0xb8000 in hex
while (text[i] != 0) {
*(char*)addr = text[i];
i+=1;
addr+=2;
}
return;
}
extern void main() {
print("test");
return;
}
Any help would be appreciated, Thanks.