Created
November 23, 2016 06:06
-
-
Save hangingman/1441284f27c7f9f49faea287e731fbfd to your computer and use it in GitHub Desktop.
object から .bim 形式変換のためのリンカスクリプト(from: http://hrb.osask.jp/wiki/?tools/obj2bim)
This file contains hidden or 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
SECTIONS { | |
/* | |
* .bimのヘッダ | |
*/ | |
.head 0x0 : | |
{ | |
/* | |
* GNU ld version 2.14.90.0.7 20031029では、以下は、なぜか'+ 0'が必要。 | |
* LOADADDR(.text) | |
* ADDR(.text) | |
* ADDR(.data) | |
* LONG(ADDR(.data)) | |
* HariStartup | |
*/ | |
LONG(SIZEOF(.text)) /* + 0 : .textサイズ */ | |
LONG(LOADADDR(.text) + 0) /* + 4 : ファイル中の.textスタートアドレス(0x24) */ | |
LONG(ADDR(.text) + 0) /* + 8 : メモリロード時の.textスタートアドレス(0x24) */ | |
LONG(SIZEOF(.data)) /* +12 : .dataサイズ */ | |
LONG(LOADADDR(.data)) /* +16 : ファイル中の.dataスタートアドレス */ | |
LONG(ADDR(.data) + 0) /* +20 : メモリロード時の.dataスタートアドレス */ | |
LONG(HariStartup + 0) /* +24 : エントリポイント */ | |
LONG(SIZEOF(.bss)) /* +28 : bss領域のバイト数 */ | |
LONG(0x0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment