diff options
Diffstat (limited to 'src/arch/i386/init')
-rw-r--r-- | src/arch/i386/init/ldscript.lb | 5 | ||||
-rw-r--r-- | src/arch/i386/init/ldscript_apc.lb | 13 | ||||
-rw-r--r-- | src/arch/i386/init/ldscript_failover.lb | 56 | ||||
-rw-r--r-- | src/arch/i386/init/ldscript_fallback.lb | 71 |
4 files changed, 141 insertions, 4 deletions
diff --git a/src/arch/i386/init/ldscript.lb b/src/arch/i386/init/ldscript.lb index e647fb42fe..c902782681 100644 --- a/src/arch/i386/init/ldscript.lb +++ b/src/arch/i386/init/ldscript.lb @@ -36,16 +36,13 @@ INPUT(linuxbios_ram.rom) SECTIONS { . = _ROMBASE; - + .ram . : { _ram = . ; linuxbios_ram.rom(*) _eram = . ; } - _x = .; - . = (_x < (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE)) ? (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE) : _x; - /* This section might be better named .setup */ .rom . : { _rom = .; diff --git a/src/arch/i386/init/ldscript_apc.lb b/src/arch/i386/init/ldscript_apc.lb new file mode 100644 index 0000000000..43570ebe90 --- /dev/null +++ b/src/arch/i386/init/ldscript_apc.lb @@ -0,0 +1,13 @@ +INPUT(linuxbios_apc.rom) +SECTIONS +{ + .apcrom . : { + _apcrom = .; + linuxbios_apc.rom(*) + _eapcrom = .; + } + _iseg_apc = DCACHE_RAM_BASE; + _eiseg_apc = _iseg_apc + SIZEOF(.apcrom); + _liseg_apc = _apcrom; + _eliseg_apc = _eapcrom; +} diff --git a/src/arch/i386/init/ldscript_failover.lb b/src/arch/i386/init/ldscript_failover.lb new file mode 100644 index 0000000000..12cb3feba8 --- /dev/null +++ b/src/arch/i386/init/ldscript_failover.lb @@ -0,0 +1,56 @@ +/* + * Memory map: + * + * _RAMBASE + * : data segment + * : bss segment + * : heap + * : stack + * _ROMBASE + * : linuxbios text + * : readonly text + */ +/* + * Bootstrap code for the STPC Consumer + * Copyright (c) 1999 by Net Insight AB. All Rights Reserved. + * + */ + +/* + * Written by Johan Rydberg, based on work by Daniel Kahlin. + * Rewritten by Eric Biederman + */ +/* + * We use ELF as output format. So that we can + * debug the code in some form. + */ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) + +/* +ENTRY(_start) +*/ + +TARGET(binary) +SECTIONS +{ + . = _ROMBASE; + + /* This section might be better named .setup */ + .rom . : { + _rom = .; + *(.rom.text); + *(.rom.data); + *(.rom.data.*); + . = ALIGN(16); + _erom = .; + } + + _lrom = LOADADDR(.rom); + _elrom = LOADADDR(.rom) + SIZEOF(.rom); + + /DISCARD/ : { + *(.comment) + *(.note) + } +} diff --git a/src/arch/i386/init/ldscript_fallback.lb b/src/arch/i386/init/ldscript_fallback.lb new file mode 100644 index 0000000000..f2ffd1288c --- /dev/null +++ b/src/arch/i386/init/ldscript_fallback.lb @@ -0,0 +1,71 @@ +/* + * Memory map: + * + * _RAMBASE + * : data segment + * : bss segment + * : heap + * : stack + * _ROMBASE + * : linuxbios text + * : readonly text + */ +/* + * Bootstrap code for the STPC Consumer + * Copyright (c) 1999 by Net Insight AB. All Rights Reserved. + * + */ + +/* + * Written by Johan Rydberg, based on work by Daniel Kahlin. + * Rewritten by Eric Biederman + */ +/* + * We use ELF as output format. So that we can + * debug the code in some form. + */ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) + +/* +ENTRY(_start) +*/ + +TARGET(binary) +INPUT(linuxbios_ram.rom) +SECTIONS +{ + . = _ROMBASE; + + .ram . : { + _ram = . ; + linuxbios_ram.rom(*) + _eram = . ; + } + + /* cut _start into last 64k*/ + _x = .; + . = (_x < (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE)) ? (_ROMBASE - 0x10000 + ROM_IMAGE_SIZE) : _x; + + /* This section might be better named .setup */ + .rom . : { + _rom = .; + *(.rom.text); + *(.rom.data); + *(.rom.data.*); + . = ALIGN(16); + _erom = .; + } + + _lrom = LOADADDR(.rom); + _elrom = LOADADDR(.rom) + SIZEOF(.rom); + _iseg = _RAMBASE; + _eiseg = _iseg + SIZEOF(.ram); + _liseg = _ram; + _eliseg = _eram; + + /DISCARD/ : { + *(.comment) + *(.note) + } +} |