-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: smallkirby <[email protected]>
- Loading branch information
1 parent
567b5ac
commit 9660b31
Showing
3 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,50 @@ | ||
KERNEL_VADDR_BASE = 0xFFFFFFFF80000000; | ||
KERNEL_VADDR_TEXT = 0xFFFFFFFF80100000; | ||
|
||
STACK_SIZE = 0x5000; | ||
|
||
PHDRS { | ||
text PT_LOAD; | ||
rodata PT_LOAD; | ||
data PT_LOAD; | ||
bss PT_LOAD; | ||
|
||
__stackguard_upper PT_LOAD FLAGS(4); | ||
__stack PT_LOAD FLAGS(6); | ||
__stackguard_lower PT_LOAD FLAGS(4); | ||
} | ||
|
||
SECTIONS { | ||
. = KERNEL_VADDR_TEXT; | ||
|
||
.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VADDR_BASE) { | ||
*(.text) | ||
*(.ltext) | ||
} | ||
} :text | ||
|
||
.rodata ALIGN(4K) : AT (ADDR(.rodata) - KERNEL_VADDR_BASE) { | ||
*(.rodata) | ||
} | ||
} :rodata | ||
|
||
.data ALIGN(4K) : AT (ADDR(.data) - KERNEL_VADDR_BASE) { | ||
*(.data) | ||
} | ||
} :data | ||
|
||
.bss ALIGN(4K) : AT (ADDR(.bss) - KERNEL_VADDR_BASE) { | ||
*(COMMON) | ||
*(.bss) | ||
} | ||
} :bss | ||
|
||
__stackguard_upper ALIGN(4K) (NOLOAD) : AT (. - KERNEL_VADDR_BASE) { | ||
. += 4K; | ||
} :__stackguard_upper | ||
|
||
__stack ALIGN(4K) (NOLOAD) : AT (. - KERNEL_VADDR_BASE) { | ||
. += STACK_SIZE; | ||
} :__stack | ||
|
||
__stackguard_lower ALIGN(4K) (NOLOAD) : AT (. - KERNEL_VADDR_BASE) { | ||
__stackguard_lower = .; | ||
. += 4K; | ||
} :__stackguard_lower | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters