-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathlinker.conf
58 lines (52 loc) · 1.36 KB
/
linker.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Output file is bios-tmp.elf, that is then changed by objcopy into the
# format we want
#
#
#STARTUP(reset.o)
ENTRY(reset)
# Code section definitions, see memory map for reference with different
# regions and stuff
#
# 00000000 - 000003FF -- IVT
# 00000400 - 000004FF -- BDA
# 00000500 - 00007BFF -- FREE
# 00007C00 - 00007DFF -- Boot sector
# 00007E00 - 0007FFFF -- FREE
# 00080000 - 0009FFFF -- EBDA
# 000A0000 -> -- MMIO
#
MEMORY {
mem_bda (rw) : org = 0x0400, len = 0xff
mem_ram (rw) : org = 0x7E00, len = (0x80000 - 0x7E00)
mem_ebda (rw) : org = 0x80000, len = (0x9FFFF - 0x80000)
mem_rom_low (rx) : org = 0xE0000, len = 0x00E00
mem_rom_high (rx) : org = 0xF0000, len = 0x10000
}
mem_ebda = 0x80000;
bda_int_handler_cpu_state = 0x04AC;
bda_int_handler_cpu_state_end = bda_int_handler_cpu_state + 16;
bda_int_handler_gdtr = bda_int_handler_cpu_state_end + 1;
SECTIONS {
.text 0x7E00 : AT (0xE0000) {
*(.bss)
*(.data)
*(.interp)
*(.dynsym)
*(.gnu.hash)
*(.rodata)
*(.plt)
*(.dynstr)
*(.rodata*)
*(.dyn*)
*(.rel*)
*(.text)
}
. = 0xF0000;
.rom_text 0xF0000 : AT (0xF0000) {
*(.rom_text)
*(.rom_int_handler)
. = 0x0FFF0;
*(.reset)
. = ALIGN(16);
} > mem_rom_high =0xFF
}