git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unifying the Lunaix's Physical Memory Model (#28)
[lunaix-os.git]
/
lunaix-os
/
link
/
linker.ld
diff --git
a/lunaix-os/link/linker.ld
b/lunaix-os/link/linker.ld
index c91bcb2100e728113e3c6e1f61aaed373ceb6ea5..93c9693961b039b2678a1aff7a9898d7dfe0bba4 100644
(file)
--- a/
lunaix-os/link/linker.ld
+++ b/
lunaix-os/link/linker.ld
@@
-2,29
+2,35
@@
ENTRY(start_)
SECTIONS {
. = 0x100000;
SECTIONS {
. = 0x100000;
+ __kboot_start = .;
/* 这里是我们的高半核初始化代码段和数据段 */
/* 这里是我们的高半核初始化代码段和数据段 */
- .boot.text BLOCK(4K) : {
+ .boot.text BLOCK(4K) :
+ {
*(.multiboot)
*(.boot.text)
}
*(.multiboot)
*(.boot.text)
}
- .boot.bss BLOCK(4K) : {
+ .boot.bss BLOCK(4K) :
+ {
*(.boot.bss)
}
*(.boot.bss)
}
- .boot.data BLOCK(4K) : {
+ .boot.data BLOCK(4K) :
+ {
*(.boot.data)
}
*(.boot.data)
}
- .boot.rodata BLOCK(4K) : {
+ .boot.rodata BLOCK(4K) :
+ {
*(.boot.rodata)
}
*(.boot.rodata)
}
- .boot.bss BLOCK(4K) : {
+ .boot.bss BLOCK(4K) :
+ {
*(.boot.rodata)
}
*(.boot.rodata)
}
- __k
exec_
boot_end = ALIGN(4K);
+ __kboot_end = ALIGN(4K);
/* ---- boot end ---- */
/* ---- boot end ---- */
@@
-33,24
+39,39
@@
SECTIONS {
. += 0xC0000000;
/* 好了,我们的内核…… */
. += 0xC0000000;
/* 好了,我们的内核…… */
- .text BLOCK(4K) : AT ( ADDR(.text) - 0xC0000000 ) {
+
+ PROVIDE(__kexec_text_start = ALIGN(4K));
+
+ .text BLOCK(4K) : AT ( ADDR(.text) - 0xC0000000 )
+ {
__kexec_start = .;
__kexec_start = .;
- PROVIDE(__kexec_text_start = .);
*(.text)
*(.text)
+ }
+
+ .kf.preempt BLOCK(4K) : AT ( ADDR(.kf.preempt) - 0xC0000000 )
+ {
+ PROVIDE(__kf_preempt_start = .);
+
+ KEEP(*(.kf.preempt));
- PROVIDE(__k
exec_tex
t_end = .);
+ PROVIDE(__k
f_preemp
t_end = .);
}
}
- .data BLOCK(4K) : AT ( ADDR(.data) - 0xC0000000 ) {
+ PROVIDE(__kexec_text_end = .);
+
+ .data BLOCK(4K) : AT ( ADDR(.data) - 0xC0000000 )
+ {
*(.data)
}
*(.data)
}
- .rodata BLOCK(4K) : AT ( ADDR(.rodata) - 0xC0000000 ) {
+ .rodata BLOCK(4K) : AT ( ADDR(.rodata) - 0xC0000000 )
+ {
*(.rodata)
}
*(.rodata)
}
- .kpg BLOCK(4K) : AT ( ADDR(.kpg) - 0xC0000000 ) {
+ .kpg BLOCK(4K) : AT ( ADDR(.kpg) - 0xC0000000 )
+ {
*(.kpg)
}
*(.kpg)
}
@@
-58,7
+79,8
@@
SECTIONS {
/* for generated array, we align to address line size */
/* for generated array, we align to address line size */
- .lga BLOCK(4K) : AT ( ADDR(.lga) - 0xC0000000 ) {
+ .lga BLOCK(4K) : AT ( ADDR(.lga) - 0xC0000000 )
+ {
PROVIDE(__lga_twiplugin_inits_start = .);
KEEP(*(.lga.twiplugin_inits));
PROVIDE(__lga_twiplugin_inits_start = .);
KEEP(*(.lga.twiplugin_inits));
@@
-130,27
+152,47
@@
SECTIONS {
. = ALIGN(8);
. = ALIGN(8);
- PROVIDE(__lga_lunainit_call_on_boot_start = .);
+ PROVIDE(__lga_lunainit_on_earlyboot_start = .);
+
+ KEEP(*(.lga.lunainit.c_earlyboot));
+
+ PROVIDE(__lga_lunainit_on_earlyboot_end = .);
+
+ /* ---- */
+
+ . = ALIGN(8);
+
+ PROVIDE(__lga_lunainit_on_boot_start = .);
KEEP(*(.lga.lunainit.c_boot));
KEEP(*(.lga.lunainit.c_boot));
- PROVIDE(__lga_lunainit_
call_
on_boot_end = .);
+ PROVIDE(__lga_lunainit_on_boot_end = .);
/* ---- */
. = ALIGN(8);
/* ---- */
. = ALIGN(8);
- PROVIDE(__lga_lunainit_
call_
on_postboot_start = .);
+ PROVIDE(__lga_lunainit_on_postboot_start = .);
KEEP(*(.lga.lunainit.c_postboot));
KEEP(*(.lga.lunainit.c_postboot));
- PROVIDE(__lga_lunainit_
call_
on_postboot_end = .);
+ PROVIDE(__lga_lunainit_on_postboot_end = .);
}
}
- .bss BLOCK(4K) : AT ( ADDR(.bss) - 0xC0000000 ) {
+ .bss BLOCK(4K) : AT ( ADDR(.bss) - 0xC0000000 )
+ {
*(.bss)
}
*(.bss)
}
+ .bss.kstack BLOCK(4K) : AT ( ADDR(.bss.kstack) - 0xC0000000)
+ {
+ PROVIDE(__bsskstack_start = .);
+
+ *(.bss.kstack)
+
+ PROVIDE(__bsskstack_end = .);
+ }
+
__kexec_end = ALIGN(4K);
}
\ No newline at end of file
__kexec_end = ALIGN(4K);
}
\ No newline at end of file