I'm trying to build a higher-half kernel with gcc 2.95.2 and gnu ld version 2.9.1. Method is one described in HigherHalfWithGdt article.
I used linker script from FAQ with no changes, assembler part has been rewritten to GAS.
The problem is when I try to launch new kernel, Grub 0.97 says: "Selected item cannot fit into memory."
Code: Select all
$ objdump -x kernel
kernel: file format elf32-i386
kernel
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0xc010002c
Program Header:
LOAD off 0x00000000 vaddr 0xc00ff000 paddr 0x000ff000 align 2**12
filesz 0x000038ea memsz 0x000038ea flags r-x
LOAD off 0x00004000 vaddr 0xc0103000 paddr 0x00103000 align 2**12
filesz 0x00000e88 memsz 0x0000d924 flags rw-
Sections:
Idx Name Size VMA LMA File off Algn
0 .setup 0000001e 00100000 00100000 00005000 2**0
CONTENTS, READONLY
1 .text 000028ca c0100020 00100020 00001020 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .data 00000e88 c0103000 00103000 00004000 2**5
CONTENTS, ALLOC, LOAD, DATA
3 .bss 0000c924 c0104000 00104000 00005000 2**5
ALLOC
4 .note 00000104 c0110924 c0110924 0000501e 2**0
CONTENTS, READONLY
5 .comment 000001ee c0110a28 c0110a28 00005122 2**0
CONTENTS, READONLY
Any ideas?