2008-02-08 05:19:31 -07:00
|
|
|
/* MN10300 Main kernel linker script
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
|
|
|
|
* Written by David Howells (dhowells@redhat.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public Licence
|
|
|
|
* as published by the Free Software Foundation; either version
|
|
|
|
* 2 of the Licence, or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
#define __VMLINUX_LDS__
|
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
#include <asm/thread_info.h>
|
2008-12-10 05:43:19 -07:00
|
|
|
#include <asm/page.h>
|
2008-02-08 05:19:31 -07:00
|
|
|
|
|
|
|
OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
|
|
|
|
OUTPUT_ARCH(mn10300)
|
|
|
|
ENTRY(_start)
|
|
|
|
jiffies = jiffies_64;
|
|
|
|
#ifndef CONFIG_MN10300_CURRENT_IN_E2
|
|
|
|
current = __current;
|
|
|
|
#endif
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
. = CONFIG_KERNEL_TEXT_ADDRESS;
|
|
|
|
/* read-only */
|
|
|
|
_stext = .;
|
|
|
|
_text = .; /* Text and read-only data */
|
|
|
|
.text : {
|
2009-04-25 19:11:04 -07:00
|
|
|
HEAD_TEXT
|
2008-02-08 05:19:31 -07:00
|
|
|
TEXT_TEXT
|
|
|
|
SCHED_TEXT
|
|
|
|
LOCK_TEXT
|
|
|
|
KPROBES_TEXT
|
|
|
|
*(.fixup)
|
|
|
|
*(.gnu.warning)
|
|
|
|
} = 0xcb
|
|
|
|
|
|
|
|
_etext = .; /* End of text section */
|
|
|
|
|
2009-06-22 07:32:36 -07:00
|
|
|
EXCEPTION_TABLE(16)
|
2008-02-08 05:19:31 -07:00
|
|
|
BUG_TABLE
|
|
|
|
|
2009-06-22 07:32:36 -07:00
|
|
|
RO_DATA(PAGE_SIZE)
|
2008-02-08 05:19:31 -07:00
|
|
|
|
|
|
|
/* writeable */
|
|
|
|
.data : { /* Data */
|
|
|
|
DATA_DATA
|
|
|
|
CONSTRUCTORS
|
|
|
|
}
|
|
|
|
|
2009-06-22 07:32:36 -07:00
|
|
|
.data_nosave : { NOSAVE_DATA; }
|
2008-02-08 05:19:31 -07:00
|
|
|
|
2009-06-22 07:32:36 -07:00
|
|
|
.data.page_aligned : { PAGE_ALIGNED_DATA(PAGE_SIZE); }
|
|
|
|
.data.cacheline_aligned : { CACHELINE_ALIGNED_DATA(32); }
|
2008-02-08 05:19:31 -07:00
|
|
|
|
|
|
|
/* rarely changed data like cpu maps */
|
|
|
|
. = ALIGN(32);
|
|
|
|
.data.read_mostly : AT(ADDR(.data.read_mostly)) {
|
2009-06-22 07:32:36 -07:00
|
|
|
READ_MOSTLY_DATA(32);
|
2008-02-08 05:19:31 -07:00
|
|
|
_edata = .; /* End of data section */
|
|
|
|
}
|
|
|
|
|
2009-06-22 07:32:36 -07:00
|
|
|
.data.init_task : { INIT_TASK(THREAD_SIZE); }
|
2008-02-08 05:19:31 -07:00
|
|
|
|
|
|
|
/* might get freed after init */
|
2008-12-10 05:43:19 -07:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2008-02-08 05:19:31 -07:00
|
|
|
.smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
|
|
|
|
__smp_locks = .;
|
|
|
|
*(.smp_locks)
|
|
|
|
__smp_locks_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* will be freed after init */
|
2008-12-10 05:43:19 -07:00
|
|
|
. = ALIGN(PAGE_SIZE); /* Init code and data */
|
2008-02-08 05:19:31 -07:00
|
|
|
__init_begin = .;
|
|
|
|
.init.text : {
|
|
|
|
_sinittext = .;
|
2009-06-22 07:32:36 -07:00
|
|
|
INIT_TEXT;
|
2008-02-08 05:19:31 -07:00
|
|
|
_einittext = .;
|
|
|
|
}
|
2009-06-22 07:32:36 -07:00
|
|
|
.init.data : { INIT_DATA; }
|
|
|
|
.setup.init : { INIT_SETUP(16); }
|
2008-02-08 05:19:31 -07:00
|
|
|
|
|
|
|
__initcall_start = .;
|
|
|
|
.initcall.init : {
|
|
|
|
INITCALLS
|
|
|
|
}
|
|
|
|
__initcall_end = .;
|
2009-06-22 07:32:36 -07:00
|
|
|
.con_initcall.init : { CON_INITCALL; }
|
2008-02-08 05:19:31 -07:00
|
|
|
|
|
|
|
SECURITY_INIT
|
|
|
|
. = ALIGN(4);
|
|
|
|
__alt_instructions = .;
|
|
|
|
.altinstructions : { *(.altinstructions) }
|
|
|
|
__alt_instructions_end = .;
|
|
|
|
.altinstr_replacement : { *(.altinstr_replacement) }
|
|
|
|
/* .exit.text is discard at runtime, not link time, to deal with references
|
|
|
|
from .altinstructions and .eh_frame */
|
2009-06-22 07:32:36 -07:00
|
|
|
.exit.text : { EXIT_TEXT; }
|
|
|
|
.exit.data : { EXIT_DATA; }
|
2008-02-08 05:19:31 -07:00
|
|
|
|
2009-06-22 07:32:36 -07:00
|
|
|
.init.ramfs : { INIT_RAM_FS; }
|
2008-02-08 05:19:31 -07:00
|
|
|
|
2008-12-10 05:43:19 -07:00
|
|
|
PERCPU(32)
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
2008-02-08 05:19:31 -07:00
|
|
|
__init_end = .;
|
|
|
|
/* freed after init ends here */
|
|
|
|
|
2009-06-22 07:32:36 -07:00
|
|
|
BSS(4)
|
2008-02-08 05:19:31 -07:00
|
|
|
|
|
|
|
_end = . ;
|
|
|
|
|
|
|
|
/* This is where the kernel creates the early boot page tables */
|
2008-12-10 05:43:19 -07:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2008-02-08 05:19:31 -07:00
|
|
|
pg0 = .;
|
|
|
|
|
|
|
|
/* Sections to be discarded */
|
|
|
|
/DISCARD/ : {
|
2009-06-22 07:32:36 -07:00
|
|
|
EXIT_CALL
|
2009-06-23 23:13:38 -07:00
|
|
|
*(.discard)
|
2008-02-08 05:19:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
STABS_DEBUG
|
|
|
|
|
|
|
|
DWARF_DEBUG
|
|
|
|
}
|