11b1fbbcaSSam Ravnborg/* ld script for sparc32/sparc64 kernel */ 21da177e4SLinus Torvalds 31da177e4SLinus Torvalds#include <asm-generic/vmlinux.lds.h> 4b74e34dbSSam Ravnborg 5bcbe40ebSSam Ravnborg#include <asm/page.h> 6b74e34dbSSam Ravnborg#include <asm/thread_info.h> 71da177e4SLinus Torvalds 81b1fbbcaSSam Ravnborg#ifdef CONFIG_SPARC32 91b1fbbcaSSam Ravnborg#define INITIAL_ADDRESS 0x10000 + SIZEOF_HEADERS 101b1fbbcaSSam Ravnborg#define TEXTSTART 0xf0004000 111b1fbbcaSSam Ravnborg 121b1fbbcaSSam Ravnborg#define SMP_CACHE_BYTES_SHIFT 5 131b1fbbcaSSam Ravnborg 141b1fbbcaSSam Ravnborg#else 151b1fbbcaSSam Ravnborg#define SMP_CACHE_BYTES_SHIFT 6 161b1fbbcaSSam Ravnborg#define INITIAL_ADDRESS 0x4000 171b1fbbcaSSam Ravnborg#define TEXTSTART 0x0000000000404000 181b1fbbcaSSam Ravnborg 191b1fbbcaSSam Ravnborg#endif 201b1fbbcaSSam Ravnborg 211b1fbbcaSSam Ravnborg#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) 221b1fbbcaSSam Ravnborg 231b1fbbcaSSam Ravnborg#ifdef CONFIG_SPARC32 241da177e4SLinus TorvaldsOUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") 251da177e4SLinus TorvaldsOUTPUT_ARCH(sparc) 261da177e4SLinus TorvaldsENTRY(_start) 271da177e4SLinus Torvaldsjiffies = jiffies_64 + 4; 281b1fbbcaSSam Ravnborg#else 291b1fbbcaSSam Ravnborg/* sparc64 */ 301b1fbbcaSSam RavnborgOUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") 311b1fbbcaSSam RavnborgOUTPUT_ARCH(sparc:v9a) 321b1fbbcaSSam RavnborgENTRY(_start) 331b1fbbcaSSam Ravnborgjiffies = jiffies_64; 341b1fbbcaSSam Ravnborg#endif 351b1fbbcaSSam Ravnborg 361da177e4SLinus TorvaldsSECTIONS 371da177e4SLinus Torvalds{ 381b1fbbcaSSam Ravnborg /* swapper_low_pmd_dir is sparc64 only */ 391b1fbbcaSSam Ravnborg swapper_low_pmd_dir = 0x0000000000402000; 401b1fbbcaSSam Ravnborg . = INITIAL_ADDRESS; 411b1fbbcaSSam Ravnborg .text TEXTSTART : 421da177e4SLinus Torvalds { 43fd593d12SEric W. Biederman _text = .; 44ce8a7424STim Abbott HEAD_TEXT 457664709bSSam Ravnborg TEXT_TEXT 461da177e4SLinus Torvalds SCHED_TEXT 471da177e4SLinus Torvalds LOCK_TEXT 481b1fbbcaSSam Ravnborg KPROBES_TEXT 49*9960e9e8SDavid S. Miller IRQENTRY_TEXT 501da177e4SLinus Torvalds *(.gnu.warning) 511da177e4SLinus Torvalds } = 0 521da177e4SLinus Torvalds _etext = .; 531b1fbbcaSSam Ravnborg 541b1fbbcaSSam Ravnborg RO_DATA(PAGE_SIZE) 55bcbe40ebSSam Ravnborg .data1 : { 56bcbe40ebSSam Ravnborg *(.data1) 57bcbe40ebSSam Ravnborg } 583240a77bSGeoffrey Thomas RW_DATA_SECTION(SMP_CACHE_BYTES, 0, THREAD_SIZE) 593240a77bSGeoffrey Thomas 60b74e34dbSSam Ravnborg /* End of data section */ 611da177e4SLinus Torvalds _edata = .; 62b74e34dbSSam Ravnborg 63bcbe40ebSSam Ravnborg .fixup : { 641da177e4SLinus Torvalds __start___fixup = .; 65bcbe40ebSSam Ravnborg *(.fixup) 661da177e4SLinus Torvalds __stop___fixup = .; 67bcbe40ebSSam Ravnborg } 683240a77bSGeoffrey Thomas EXCEPTION_TABLE(16) 690c0d345eSDavid S. Miller NOTES 700c0d345eSDavid S. Miller 71bcbe40ebSSam Ravnborg . = ALIGN(PAGE_SIZE); 723240a77bSGeoffrey Thomas __init_begin = ALIGN(PAGE_SIZE); 733240a77bSGeoffrey Thomas INIT_TEXT_SECTION(PAGE_SIZE) 74bcbe40ebSSam Ravnborg __init_text_end = .; 753240a77bSGeoffrey Thomas INIT_DATA_SECTION(16) 7667d38229SJean-Paul Saman 771b1fbbcaSSam Ravnborg . = ALIGN(4); 781b1fbbcaSSam Ravnborg .tsb_ldquad_phys_patch : { 791b1fbbcaSSam Ravnborg __tsb_ldquad_phys_patch = .; 801b1fbbcaSSam Ravnborg *(.tsb_ldquad_phys_patch) 811b1fbbcaSSam Ravnborg __tsb_ldquad_phys_patch_end = .; 821b1fbbcaSSam Ravnborg } 831b1fbbcaSSam Ravnborg 841b1fbbcaSSam Ravnborg .tsb_phys_patch : { 851b1fbbcaSSam Ravnborg __tsb_phys_patch = .; 861b1fbbcaSSam Ravnborg *(.tsb_phys_patch) 871b1fbbcaSSam Ravnborg __tsb_phys_patch_end = .; 881b1fbbcaSSam Ravnborg } 891b1fbbcaSSam Ravnborg 901b1fbbcaSSam Ravnborg .cpuid_patch : { 911b1fbbcaSSam Ravnborg __cpuid_patch = .; 921b1fbbcaSSam Ravnborg *(.cpuid_patch) 931b1fbbcaSSam Ravnborg __cpuid_patch_end = .; 941b1fbbcaSSam Ravnborg } 951b1fbbcaSSam Ravnborg 961b1fbbcaSSam Ravnborg .sun4v_1insn_patch : { 971b1fbbcaSSam Ravnborg __sun4v_1insn_patch = .; 981b1fbbcaSSam Ravnborg *(.sun4v_1insn_patch) 991b1fbbcaSSam Ravnborg __sun4v_1insn_patch_end = .; 1001b1fbbcaSSam Ravnborg } 1011b1fbbcaSSam Ravnborg .sun4v_2insn_patch : { 1021b1fbbcaSSam Ravnborg __sun4v_2insn_patch = .; 1031b1fbbcaSSam Ravnborg *(.sun4v_2insn_patch) 1041b1fbbcaSSam Ravnborg __sun4v_2insn_patch_end = .; 1051b1fbbcaSSam Ravnborg } 1061b1fbbcaSSam Ravnborg 107bcbe40ebSSam Ravnborg PERCPU(PAGE_SIZE) 1081b1fbbcaSSam Ravnborg 109bcbe40ebSSam Ravnborg . = ALIGN(PAGE_SIZE); 1101da177e4SLinus Torvalds __init_end = .; 1113240a77bSGeoffrey Thomas BSS_SECTION(0, 0, 0) 1121da177e4SLinus Torvalds _end = . ; 1131b1fbbcaSSam Ravnborg 114d5784b57SDavid S. Miller STABS_DEBUG 115d5784b57SDavid S. Miller DWARF_DEBUG 116023bf6f1STejun Heo 117023bf6f1STejun Heo DISCARDS 1181da177e4SLinus Torvalds} 119