mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-10 21:14:38 -04:00
Change the way sections are set
This commit is contained in:
parent
1433bcd51c
commit
8fca1bc2a0
@ -8,6 +8,10 @@
|
|||||||
#ifndef BOOT_32_HPP
|
#ifndef BOOT_32_HPP
|
||||||
#define BOOT_32_HPP
|
#define BOOT_32_HPP
|
||||||
|
|
||||||
void __attribute((section("boot_32_section"), noreturn)) pm_main();
|
extern "C" {
|
||||||
|
|
||||||
|
void __attribute((noreturn)) pm_main();
|
||||||
|
|
||||||
|
} //end of exern "C"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,12 +7,12 @@ SECTIONS
|
|||||||
|
|
||||||
.text_16 BLOCK(512) : ALIGN(512)
|
.text_16 BLOCK(512) : ALIGN(512)
|
||||||
{
|
{
|
||||||
*(boot_16)
|
boot_16_64.o(.text)
|
||||||
}
|
}
|
||||||
|
|
||||||
.text_32 BLOCK(512) : ALIGN(512)
|
.text_32 BLOCK(512) : ALIGN(512)
|
||||||
{
|
{
|
||||||
*(boot_32)
|
boot_32_64.o(.text)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 4K of code */
|
/* 4K of code */
|
||||||
|
@ -107,7 +107,7 @@ void __attribute__((noreturn)) pm_jump(){
|
|||||||
|
|
||||||
} //end of anonymous namespace
|
} //end of anonymous namespace
|
||||||
|
|
||||||
void __attribute__ ((section("boot_16_section"), noreturn)) rm_main(){
|
void __attribute__ ((noreturn)) rm_main(){
|
||||||
//Make sure segments are clean
|
//Make sure segments are clean
|
||||||
reset_segments();
|
reset_segments();
|
||||||
|
|
||||||
|
@ -103,6 +103,8 @@ void __attribute__((noreturn)) lm_jump(){
|
|||||||
|
|
||||||
} //end of anonymous namespace
|
} //end of anonymous namespace
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
void pm_main(){
|
void pm_main(){
|
||||||
//Update segments
|
//Update segments
|
||||||
set_segments();
|
set_segments();
|
||||||
@ -125,3 +127,5 @@ void pm_main(){
|
|||||||
//long mode jump
|
//long mode jump
|
||||||
lm_jump();
|
lm_jump();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} //end of exern "C"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user