Code: Select all
ENTRY(BootEntry)
OUTPUT_FORMAT("elf32-i386")
SECTIONS
{
.text 0x100000 :
{
code = .;
*(.text)
*(.rodata) /* Assuming ELF cross-compiler. */
. = ALIGN(4096);
}
.data :
{
/* Constructor and destructor variables are only used in ASM, so C-linkage is not necessary. */
ConstrStart = .;
*(.ctor*)
ConstrEnd = .;
DestrStart = .;
*(.dtor*)
DestrEnd = .;
data = .;
*(.data)
*(.rodata) /* Assuming ELF cross-compiler, does this even need to be put here? */
. = ALIGN(4096);
}
.bss :
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}
INPUT
(
Entry.obj
AsmImp.obj
DescriptorTables.obj
ISR.obj
IRQ.obj
GRUB.o
Kernel.o
Keyboard.o
Event.o
CppInit.o
cstring.o
CCRead.o
CCWrite.o
Heap.o
Memory.o
Multitasking.o
OrderedList.o
Paging.o
Floppy.o
NuclixFont.o
FireDit.o
CmdHandlers.o
FireShell.o
Main.o
)
OUTPUT(Kernel.nsf)
Code: Select all
(*.rodata)
Code: Select all
(*.rodata*)
Thanks for your time,
Creature
EDIT: Just recently I found something new; I was testing my vector implementation with a custom class foo I quickly made to test some functions. I got a page-fault, then I started using the 'Print-Something-In-The-Bochs-Console' way to find out exactly where it page-faulted, and when I put this in front of the function:
Code: Select all
BX_DebugStr(""); //Will output nothing as DebugStr will stop if the null-terminator is found.
The page-fault disappeared. I have no idea what is going on here and am amazed to see this fixed a page-fault, but the function doesn't do anything, and even if it did, it just writes to 2 or 3 ports that Bochs reads to print something in the background console!