Nabend zusammen,
ich habe ein Problem mit Grub. Qemu winkt den Code durch.
Ich habe meinen Kernel gebaut, der komplett oberhalb der 1MB Grenze liegt.
Leider ist Grub da anderer Meinung.
Hier mal mein Linker-Skript:
ENTRY(_start)
OUTPUT(elf32-i386)
OUTPUT_ARCH(i386:i386)
SECTIONS
{
. = 0x100000;
__kernel_entry = .;
__init_entry = .;
__init32_entry = .;
.init32 0x100000 : {
*(.multiboot)
*(.init32_text)
*(.init32_data)
}
__init32_end = .;
__init_end = .;
. = ALIGN(0x1000);
__ro_data_entry = .;
.text : {
*(.text)
*(.rodata)
}
__ro_data_end = .;
. = ALIGN(0x1000);
__rw_data_entry = .;
.data : {
*(.data)
}
.bss : {
*(COMMON)
*(.bss)
}
__rw_data_end = .;
__kernel_end = .;
/DISCARD/ : { *(.comment) }
}
Hier noch ein paar Ausgaben (readelf und objdump):
rizor-kernel/rizor-kernel.krn: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .init32 00004c58 00100000 00100000 00001000 2**5
CONTENTS, ALLOC, LOAD, CODE
1 .text 00009328 00105000 00105000 00006000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .data 00000054 0010f000 0010f000 00010000 2**5
CONTENTS, ALLOC, LOAD, DATA
3 .bss 00005c68 0010f060 0010f060 00010054 2**5
ALLOC
4 .debug_abbrev 00002a7c 00000000 00000000 00010054 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 0000c1ea 00000000 00000000 00012ad0 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_line 000031d6 00000000 00000000 0001ecba 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_loc 000027bb 00000000 00000000 00021e90 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_pubnames 00001df3 00000000 00000000 0002464b 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_pubtypes 00001ecd 00000000 00000000 0002643e 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_aranges 00000588 00000000 00000000 00028310 2**3
CONTENTS, READONLY, DEBUGGING
11 .debug_str 00003063 00000000 00000000 00028898 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_frame 00001a04 00000000 00000000 0002b8fc 2**2
CONTENTS, READONLY, DEBUGGING
13 .debug_ranges 00000298 00000000 00000000 0002d300 2**0
CONTENTS, READONLY, DEBUGGING
There are 18 section headers, starting at offset 0x2d654:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .init32 PROGBITS 00100000 001000 004c58 00 WAX 0 0 32
[ 2] .text PROGBITS 00105000 006000 009328 00 AX 0 0 4
[ 3] .data PROGBITS 0010f000 010000 000054 00 WA 0 0 32
[ 4] .bss NOBITS 0010f060 010054 005c68 00 WA 0 0 32
[ 5] .debug_abbrev PROGBITS 00000000 010054 002a7c 00 0 0 1
[ 6] .debug_info PROGBITS 00000000 012ad0 00c1ea 00 0 0 1
[ 7] .debug_line PROGBITS 00000000 01ecba 0031d6 00 0 0 1
[ 8] .debug_loc PROGBITS 00000000 021e90 0027bb 00 0 0 1
[ 9] .debug_pubnames PROGBITS 00000000 02464b 001df3 00 0 0 1
[10] .debug_pubtypes PROGBITS 00000000 02643e 001ecd 00 0 0 1
[11] .debug_aranges PROGBITS 00000000 028310 000588 00 0 0 8
[12] .debug_str PROGBITS 00000000 028898 003063 01 MS 0 0 1
[13] .debug_frame PROGBITS 00000000 02b8fc 001a04 00 0 0 4
[14] .debug_ranges PROGBITS 00000000 02d300 000298 00 0 0 1
[15] .shstrtab STRTAB 00000000 02d598 0000ba 00 0 0 1
[16] .symtab SYMTAB 00000000 02d924 001e40 10 17 71 4
[17] .strtab STRTAB 00000000 02f764 001a4f 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
Was kann GRUB dazu bewegen mir diese Meldungen zu geben.
Kann es an den Debug-Sektionen liegen?
Danke.