Commit 4cf97e31 authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

[PATCH] H8/300 vmlinux.lds update

Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 95885c8e
#define VMLINUX_SYMBOL(_sym_) _##_sym_ #define VMLINUX_SYMBOL(_sym_) _##_sym_
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <linux/config.h> #include <linux/config.h>
/* target memory map */
#ifdef CONFIG_H8300H_GENERIC #ifdef CONFIG_H8300H_GENERIC
#ifdef CONFIG_ROMKERNEL #define ROMTOP 0x000000
#include "../platform/h8300h/generic/rom.ld" #define ROMSIZE 0x200000
#endif #define RAMTOP 0x200000
#ifdef CONFIG_RAMKERNEL #define RAMSIZE 0x200000
#include "../platform/h8300h/generic/ram.ld"
#endif
#endif #endif
#ifdef CONFIG_H8300H_AKI3068NET #ifdef CONFIG_H8300H_AKI3068NET
#ifdef CONFIG_ROMKERNEL #define ROMTOP 0x000000
#include "../platform/h8300h/aki3068net/rom.ld" #define ROMSIZE 0x080000
#endif #define RAMTOP 0x400000
#ifdef CONFIG_RAMKERNEL #define RAMSIZE 0x200000
#include "../platform/h8300h/aki3068net/ram.ld"
#endif
#endif #endif
#ifdef CONFIG_H8300H_H8MAX #ifdef CONFIG_H8300H_H8MAX
#ifdef CONFIG_ROMKERNEL #define ROMTOP 0x000000
#include "../platform/h8300h/h8max/rom.ld" #define ROMSIZE 0x080000
#endif #define RAMTOP 0x400000
#ifdef CONFIG_RAMKERNEL #define RAMSIZE 0x200000
#include "../platform/h8300h/h8max/ram.ld"
#endif
#endif #endif
#ifdef CONFIG_H8300H_SIM #ifdef CONFIG_H8300H_SIM
#ifdef CONFIG_ROMKERNEL #define ROMTOP 0x000000
#include "../platform/h8300h/generic/rom.ld" #define ROMSIZE 0x200000
#endif #define RAMTOP 0x200000
#ifdef CONFIG_RAMKERNEL #define RAMSIZE 0x200000
#include "../platform/h8300h/generic/ram.ld"
#endif
#endif #endif
#ifdef CONFIG_H8S_SIM #ifdef CONFIG_H8S_SIM
#ifdef CONFIG_ROMKERNEL #define ROMTOP 0x000000
#include "../platform/h8s/generic/rom.ld" #define ROMSIZE 0x200000
#endif #define RAMTOP 0x200000
#ifdef CONFIG_RAMKERNEL #define RAMSIZE 0x200000
#include "../platform/h8s/generic/ram.ld"
#endif
#endif #endif
#ifdef CONFIG_H8S_EDOSK2674 #ifdef CONFIG_H8S_EDOSK2674
#ifdef CONFIG_ROMKERNEL #define ROMTOP 0x000000
#include "../platform/h8s/edosk2674/rom.ld" #define ROMSIZE 0x400000
#endif #define RAMTOP 0x400000
#ifdef CONFIG_RAMKERNEL #define RAMSIZE 0x800000
#include "../platform/h8s/edosk2674/ram.ld"
#endif
#endif #endif
#if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM) #if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)
...@@ -66,17 +54,18 @@ _jiffies = _jiffies_64 + 4; ...@@ -66,17 +54,18 @@ _jiffies = _jiffies_64 + 4;
SECTIONS SECTIONS
{ {
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
. = ROMTOP;
.vectors : .vectors :
{ {
__vector = . ; __vector = . ;
*(.vectors*) *(.vectors*)
} > vector }
#endif #else
#if defined(CONFIG_RAMKERNEL) . = RAMTOP;
.bootvec : .bootvec :
{ {
*(.bootvec) *(.bootvec)
} > ram }
#endif #endif
.text : .text :
{ {
...@@ -86,48 +75,24 @@ SECTIONS ...@@ -86,48 +75,24 @@ SECTIONS
__stext = . ; __stext = . ;
*(.text) *(.text)
SCHED_TEXT SCHED_TEXT
. = ALIGN(0x4) ; LOCK_TEXT
*(.exit.text) __etext = . ;
*(.text.*)
. = ALIGN(0x4) ;
*(.exitcall.exit)
. = ALIGN(0x4) ;
*(.kstrtab)
. = ALIGN(0x4) ;
*(.rodata*)
. = ALIGN(16); /* Exception table */ . = ALIGN(16); /* Exception table */
___start___ex_table = .; ___start___ex_table = .;
*(__ex_table) *(__ex_table)
___stop___ex_table = .; ___stop___ex_table = .;
___start___ksymtab = .; /* Kernel symbol table */ RODATA
*(__ksymtab)
___stop___ksymtab = .;
___start___ksymtab_gpl = .; /* Kernel symbol table: GPL-only symbols */
*(__ksymtab_gpl)
___stop___ksymtab_gpl = .;
___start___kcrctab = .; /* Kernel symbol table: Normal symbols */
*(__kcrctab)
___stop___kcrctab = .;
___start___kcrctab_gpl = .; /* Kernel symbol table: GPL-only symbols */
*(__kcrctab_gpl)
___stop___kcrctab_gpl = .;
*(__ksymtab_strings) /* Kernel symbol table: strings */
. = ALIGN(0x4) ;
__etext = . ;
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
} > rom SECURITY_INIT
#endif #endif
#if defined(CONFIG_RAMKERNEL) ROEND = .;
} > ram #if defined(CONFIG_ROMKERNEL)
. = RAMTOP;
.data : AT(ROEND)
#else
.data :
#endif #endif
.data : AT( ADDR(.text)+SIZEOF(.text))
{ {
__sdata = . ; __sdata = . ;
___data_start = . ; ___data_start = . ;
...@@ -162,6 +127,8 @@ SECTIONS ...@@ -162,6 +127,8 @@ SECTIONS
___con_initcall_start = .; ___con_initcall_start = .;
*(.con_initcall.init) *(.con_initcall.init)
___con_initcall_end = .; ___con_initcall_end = .;
*(.exit.text)
*(.exit.data)
. = ALIGN(4); . = ALIGN(4);
___initramfs_start = .; ___initramfs_start = .;
*(.init.ramfs) *(.init.ramfs)
...@@ -169,13 +136,13 @@ SECTIONS ...@@ -169,13 +136,13 @@ SECTIONS
. = ALIGN(0x4) ; . = ALIGN(0x4) ;
___init_end = .; ___init_end = .;
__edata = . ; __edata = . ;
} > ram }
#if defined(CONFIG_RAMKERNEL)
SECURITY_INIT
#endif
__begin_data = LOADADDR(.data) ; __begin_data = LOADADDR(.data) ;
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
.erom : __erom = LOADADDR(.data) + SIZEOF(.data) ;
{
__erom = . ;
} > erom
#endif #endif
.bss : .bss :
{ {
...@@ -188,15 +155,19 @@ SECTIONS ...@@ -188,15 +155,19 @@ SECTIONS
__ebss = . ; __ebss = . ;
__end = . ; __end = . ;
__ramstart = .; __ramstart = .;
} > ram }
/DISCARD/ : {
*(.exitcall.exit)
}
.romfs : .romfs :
{ {
*(.romfs*) *(.romfs*)
} > ram }
. = RAMTOP+RAMSIZE;
.dummy : .dummy :
{ {
COMMAND_START = . - 0x200 ; COMMAND_START = . - 0x200 ;
__ramend = . ; __ramend = . ;
} > eram }
} }
/* AE-3068 (aka. aki3068net) RAM */
OUTPUT_ARCH(h8300h)
ENTRY("__start")
MEMORY
{
ram : ORIGIN = 0x400000, LENGTH = 0x600000-0x400000
eram : ORIGIN = 0x600000, LENGTH = 0
iram : ORIGIN = 0xffbf20, LENGTH = 0x4000
}
/* Generic RAM */
OUTPUT_ARCH(h8300h)
ENTRY("__start")
MEMORY
{
ram : ORIGIN = 0x400000, LENGTH = 0x200000
eram : ORIGIN = 0x600000, LENGTH = 0
iram : ORIGIN = 0xffbf20, LENGTH = 0x4000
}
OUTPUT_ARCH(h8300h)
ENTRY("__start")
MEMORY
{
vector : ORIGIN = 0x000000, LENGTH = 0x000100
rom : ORIGIN = 0x000100, LENGTH = 0x200000-0x000100
erom : ORIGIN = 0x200000, LENGTH = 0
ram : ORIGIN = 0x200000, LENGTH = 0x400000
eram : ORIGIN = 0x600000, LENGTH = 0
}
/* H8MAX RAM */
OUTPUT_ARCH(h8300h)
ENTRY("__start")
MEMORY
{
ram : ORIGIN = 0x400000, LENGTH = 0x600000-0x400000
eram : ORIGIN = 0x600000, LENGTH = 0
iram : ORIGIN = 0xfffd20, LENGTH = 0x100
}
...@@ -181,7 +181,7 @@ __command_line: ...@@ -181,7 +181,7 @@ __command_line:
.long __start .long __start
.long __start .long __start
vector = 2 vector = 2
.rept 126-1 .rept 126
.long _interrupt_redirect_table+vector*4 .long _interrupt_redirect_table+vector*4
vector = vector + 1 vector = vector + 1
.endr .endr
/* EDOSK-2674R RAM */
OUTPUT_ARCH(h8300s)
ENTRY("__start")
MEMORY
{
ram : ORIGIN = 0x400000, LENGTH = 0xc00000-0x400000
eram : ORIGIN = 0xc00000, LENGTH = 0
}
OUTPUT_ARCH(h8300s)
ENTRY("__start")
MEMORY
{
vector : ORIGIN = 0x000000, LENGTH = 0x000200
rom : ORIGIN = 0x000200, LENGTH = 0x100000-0x000200
erom : ORIGIN = 0x100000, LENGTH = 0
ram : ORIGIN = 0x400000, LENGTH = 0xc00000-0x400000
eram : ORIGIN = 0xc00000, LENGTH = 0
}
OUTPUT_ARCH(h8300s)
ENTRY("__start")
MEMORY
{
ram : ORIGIN = 0x400000, LENGTH = 0x200000
eram : ORIGIN = 0x600000, LENGTH = 0
}
OUTPUT_ARCH(h8300s)
ENTRY("__start")
MEMORY
{
vector : ORIGIN = 0x000000, LENGTH = 0x000200
rom : ORIGIN = 0x000200, LENGTH = 0x200000-0x000200
erom : ORIGIN = 0x200000, LENGTH = 0
ram : ORIGIN = 0x200000, LENGTH = 0x400000
eram : ORIGIN = 0x600000, LENGTH = 0
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment