-
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.
Updated 21_day/harib18c with app.lds
- Loading branch information
1 parent
37b25ba
commit 2016cb3
Showing
3 changed files
with
36 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
This linker script is created by refer following page. | ||
https://vanya.jp.net/os/haribote.html | ||
*/ | ||
|
||
OUTPUT_FORMAT("binary"); | ||
|
||
SECTIONS | ||
{ | ||
.head 0x0 : { | ||
LONG(128 * 1024) /* 0 : stack+.data+heap の大きさ(4KBの倍数) */ | ||
LONG(0x69726148) /* 4 : シグネチャ "Hari" */ | ||
LONG(0) /* 8 : mmarea の大きさ(4KBの倍数) */ | ||
LONG(0x0400) /* 12 : スタック初期値&.data転送先 */ | ||
LONG(SIZEOF(.data)) /* 16 : .dataサイズ */ | ||
LONG(LOADADDR(.data)) /* 20 : .dataの初期値列のファイル位置 */ | ||
LONG(0xE9000000) /* 24 : 0xE9000000 */ | ||
LONG(_HariMain - 0x20) /* 28 : エントリアドレス - 0x20 */ | ||
LONG(24*1024) /* 32 : heap領域(malloc領域)開始アドレス */ | ||
} | ||
|
||
.text : { *(.text) } | ||
|
||
.data 0x0400 : AT ( ADDR(.text) + SIZEOF(.text) ) { | ||
*(.data) | ||
*(.rodata*) | ||
*(.bss) | ||
} | ||
|
||
/DISCARD/ : { *(.eh_frame) } | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 |