2008-11-29 22:44:32 -07:00
|
|
|
/* ld script for sparc32/sparc64 kernel */
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
2008-12-27 01:34:41 -07:00
|
|
|
|
2007-09-17 19:02:30 -07:00
|
|
|
#include <asm/page.h>
|
2008-12-27 01:34:41 -07:00
|
|
|
#include <asm/thread_info.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-11-29 22:44:32 -07:00
|
|
|
#ifdef CONFIG_SPARC32
|
|
|
|
#define INITIAL_ADDRESS 0x10000 + SIZEOF_HEADERS
|
|
|
|
#define TEXTSTART 0xf0004000
|
|
|
|
|
|
|
|
#define SMP_CACHE_BYTES_SHIFT 5
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define SMP_CACHE_BYTES_SHIFT 6
|
|
|
|
#define INITIAL_ADDRESS 0x4000
|
|
|
|
#define TEXTSTART 0x0000000000404000
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT)
|
|
|
|
|
|
|
|
#ifdef CONFIG_SPARC32
|
2005-04-16 15:20:36 -07:00
|
|
|
OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
|
|
|
|
OUTPUT_ARCH(sparc)
|
|
|
|
ENTRY(_start)
|
|
|
|
jiffies = jiffies_64 + 4;
|
2008-11-29 22:44:32 -07:00
|
|
|
#else
|
|
|
|
/* sparc64 */
|
|
|
|
OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc")
|
|
|
|
OUTPUT_ARCH(sparc:v9a)
|
|
|
|
ENTRY(_start)
|
|
|
|
jiffies = jiffies_64;
|
|
|
|
#endif
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
SECTIONS
|
|
|
|
{
|
2008-11-29 22:44:32 -07:00
|
|
|
/* swapper_low_pmd_dir is sparc64 only */
|
|
|
|
swapper_low_pmd_dir = 0x0000000000402000;
|
|
|
|
. = INITIAL_ADDRESS;
|
|
|
|
.text TEXTSTART :
|
2007-09-17 19:02:30 -07:00
|
|
|
{
|
|
|
|
_text = .;
|
2008-11-22 10:36:04 -07:00
|
|
|
*(.text.head)
|
2007-09-17 19:02:30 -07:00
|
|
|
TEXT_TEXT
|
|
|
|
SCHED_TEXT
|
|
|
|
LOCK_TEXT
|
2008-11-29 22:44:32 -07:00
|
|
|
KPROBES_TEXT
|
2007-09-17 19:02:30 -07:00
|
|
|
*(.gnu.warning)
|
|
|
|
} = 0
|
|
|
|
_etext = .;
|
2008-11-29 22:44:32 -07:00
|
|
|
|
|
|
|
RO_DATA(PAGE_SIZE)
|
2007-09-17 19:02:30 -07:00
|
|
|
.data : {
|
|
|
|
DATA_DATA
|
|
|
|
CONSTRUCTORS
|
|
|
|
}
|
|
|
|
.data1 : {
|
|
|
|
*(.data1)
|
|
|
|
}
|
2008-11-29 22:44:32 -07:00
|
|
|
. = ALIGN(SMP_CACHE_BYTES);
|
|
|
|
.data.cacheline_aligned : {
|
|
|
|
*(.data.cacheline_aligned)
|
|
|
|
}
|
|
|
|
. = ALIGN(SMP_CACHE_BYTES);
|
|
|
|
.data.read_mostly : {
|
|
|
|
*(.data.read_mostly)
|
|
|
|
}
|
2008-12-27 01:34:41 -07:00
|
|
|
/* End of data section */
|
2007-09-17 19:02:30 -07:00
|
|
|
_edata = .;
|
2008-12-27 01:34:41 -07:00
|
|
|
|
|
|
|
/* init_task */
|
|
|
|
. = ALIGN(THREAD_SIZE);
|
|
|
|
.data.init_task : {
|
|
|
|
*(.data.init_task)
|
|
|
|
}
|
2007-09-17 19:02:30 -07:00
|
|
|
.fixup : {
|
|
|
|
__start___fixup = .;
|
|
|
|
*(.fixup)
|
|
|
|
__stop___fixup = .;
|
|
|
|
}
|
2008-11-29 22:44:32 -07:00
|
|
|
. = ALIGN(16);
|
2007-09-17 19:02:30 -07:00
|
|
|
__ex_table : {
|
|
|
|
__start___ex_table = .;
|
|
|
|
*(__ex_table)
|
|
|
|
__stop___ex_table = .;
|
|
|
|
}
|
|
|
|
NOTES
|
|
|
|
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
.init.text : {
|
2008-11-29 22:44:32 -07:00
|
|
|
__init_begin = .;
|
2007-09-17 19:02:30 -07:00
|
|
|
_sinittext = .;
|
2008-01-20 06:15:03 -07:00
|
|
|
INIT_TEXT
|
2007-09-17 19:02:30 -07:00
|
|
|
_einittext = .;
|
|
|
|
}
|
|
|
|
__init_text_end = .;
|
|
|
|
.init.data : {
|
2008-01-20 06:15:03 -07:00
|
|
|
INIT_DATA
|
2007-09-17 19:02:30 -07:00
|
|
|
}
|
|
|
|
. = ALIGN(16);
|
|
|
|
.init.setup : {
|
|
|
|
__setup_start = .;
|
|
|
|
*(.init.setup)
|
|
|
|
__setup_end = .;
|
|
|
|
}
|
|
|
|
.initcall.init : {
|
|
|
|
__initcall_start = .;
|
|
|
|
INITCALLS
|
2008-11-29 22:44:32 -07:00
|
|
|
__initcall_end = .;
|
2007-09-17 19:02:30 -07:00
|
|
|
}
|
|
|
|
.con_initcall.init : {
|
|
|
|
__con_initcall_start = .;
|
|
|
|
*(.con_initcall.init)
|
|
|
|
__con_initcall_end = .;
|
|
|
|
}
|
|
|
|
SECURITY_INIT
|
2007-02-10 02:44:44 -07:00
|
|
|
|
2008-11-29 22:44:32 -07:00
|
|
|
. = ALIGN(4);
|
|
|
|
.tsb_ldquad_phys_patch : {
|
|
|
|
__tsb_ldquad_phys_patch = .;
|
|
|
|
*(.tsb_ldquad_phys_patch)
|
|
|
|
__tsb_ldquad_phys_patch_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tsb_phys_patch : {
|
|
|
|
__tsb_phys_patch = .;
|
|
|
|
*(.tsb_phys_patch)
|
|
|
|
__tsb_phys_patch_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
.cpuid_patch : {
|
|
|
|
__cpuid_patch = .;
|
|
|
|
*(.cpuid_patch)
|
|
|
|
__cpuid_patch_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sun4v_1insn_patch : {
|
|
|
|
__sun4v_1insn_patch = .;
|
|
|
|
*(.sun4v_1insn_patch)
|
|
|
|
__sun4v_1insn_patch_end = .;
|
|
|
|
}
|
|
|
|
.sun4v_2insn_patch : {
|
|
|
|
__sun4v_2insn_patch = .;
|
|
|
|
*(.sun4v_2insn_patch)
|
|
|
|
__sun4v_2insn_patch_end = .;
|
|
|
|
}
|
|
|
|
|
2007-02-10 02:44:44 -07:00
|
|
|
#ifdef CONFIG_BLK_DEV_INITRD
|
2007-09-17 19:02:30 -07:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
.init.ramfs : {
|
2008-11-29 22:44:32 -07:00
|
|
|
__initramfs_start = .;
|
2007-09-17 19:02:30 -07:00
|
|
|
*(.init.ramfs)
|
2008-11-29 22:44:32 -07:00
|
|
|
__initramfs_end = .;
|
2007-09-17 19:02:30 -07:00
|
|
|
}
|
2007-02-10 02:44:44 -07:00
|
|
|
#endif
|
|
|
|
|
2007-09-17 19:02:30 -07:00
|
|
|
PERCPU(PAGE_SIZE)
|
2008-11-29 22:44:32 -07:00
|
|
|
|
2007-09-17 19:02:30 -07:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__init_end = .;
|
|
|
|
__bss_start = .;
|
|
|
|
.sbss : {
|
|
|
|
*(.sbss)
|
2008-11-29 22:44:32 -07:00
|
|
|
*(.scommon)
|
|
|
|
}
|
2007-09-17 19:02:30 -07:00
|
|
|
.bss : {
|
|
|
|
*(.dynbss)
|
|
|
|
*(.bss)
|
|
|
|
*(COMMON)
|
|
|
|
}
|
|
|
|
_end = . ;
|
2008-11-29 22:44:32 -07:00
|
|
|
|
2007-09-17 19:02:30 -07:00
|
|
|
/DISCARD/ : {
|
2008-01-20 06:15:03 -07:00
|
|
|
EXIT_TEXT
|
|
|
|
EXIT_DATA
|
2007-09-17 19:02:30 -07:00
|
|
|
*(.exitcall.exit)
|
|
|
|
}
|
2005-12-28 14:22:54 -07:00
|
|
|
|
2007-09-17 19:02:30 -07:00
|
|
|
STABS_DEBUG
|
|
|
|
DWARF_DEBUG
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|