-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinkerscript.lnk
37 lines (29 loc) · 1.05 KB
/
linkerscript.lnk
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
name build/kernel/kernel.bin # name of resulting binary
output raw # type of binary
# The kernel will be loaded into 0x0050:0x0000
option offset=0x0500
# objects to link
file build/kernel/kernel.o # this one has to be first
file build/kernel/cpu.o
file build/kernel/video.o
file build/kernel/keyboard.o
# ... add more obj files here
order # order segments be put into binary
clname CODE
segaddr=0x0050 offset=0x0000
segment _TEXT
clname DATA
# Works on Mac
#segment CONST segaddr=0x0050 offset=0x72FF
#segment _DATA segaddr=0x0050 offset=0x74FF
# Works on linux
segment CONST segaddr=0x0050 offset=0x74FF
segment _DATA segaddr=0x0050 offset=0x76FF
# What to do with this?
#segment CONST2 segaddr=0x0050 offset=0x0200
option NOCASEEXACT
option map
option NODEFAULTLIBS
option verbose
option START=start_ # Fix the W1023 warning
disable 1014 # `Warning! W1014: stack segment not found`