108dbd0f8SThomas Gleixner/* SPDX-License-Identifier: GPL-2.0-only */ 2e95bf452SRichard Kuo/* 3e95bf452SRichard Kuo * Linker script for Hexagon kernel 4e95bf452SRichard Kuo * 5f6b708c1SRichard Kuo * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved. 6e95bf452SRichard Kuo */ 7e95bf452SRichard Kuo 8e95bf452SRichard Kuo#include <asm-generic/vmlinux.lds.h> 9e95bf452SRichard Kuo#include <asm/asm-offsets.h> /* Most of the kernel defines are here */ 10e95bf452SRichard Kuo#include <asm/mem-layout.h> /* except for page_offset */ 11e95bf452SRichard Kuo#include <asm/cache.h> /* and now we're pulling cache line size */ 120b04ea68SDavid Howells#include <asm/thread_info.h> /* and we need THREAD_SIZE too */ 130b04ea68SDavid Howells 14e95bf452SRichard KuoOUTPUT_ARCH(hexagon) 15e95bf452SRichard KuoENTRY(stext) 16e95bf452SRichard Kuo 17e95bf452SRichard Kuojiffies = jiffies_64; 18e95bf452SRichard Kuo 19e95bf452SRichard Kuo/* 20e95bf452SRichard KuoSee asm-generic/vmlinux.lds.h for expansion of some of these macros. 21e95bf452SRichard KuoSee asm-generic/sections.h for seemingly required labels. 22e95bf452SRichard Kuo*/ 23e95bf452SRichard Kuo 24e95bf452SRichard Kuo#define PAGE_SIZE _PAGE_SIZE 25e95bf452SRichard Kuo 26e95bf452SRichard KuoSECTIONS 27e95bf452SRichard Kuo{ 288f5a0b9dSRichard Kuo . = PAGE_OFFSET; 29e95bf452SRichard Kuo 30e95bf452SRichard Kuo __init_begin = .; 31e95bf452SRichard Kuo HEAD_TEXT_SECTION 32e95bf452SRichard Kuo INIT_TEXT_SECTION(PAGE_SIZE) 33e95bf452SRichard Kuo PERCPU_SECTION(L1_CACHE_BYTES) 34e95bf452SRichard Kuo __init_end = .; 35e95bf452SRichard Kuo 36e95bf452SRichard Kuo . = ALIGN(_PAGE_SIZE); 37e95bf452SRichard Kuo _stext = .; 388f5a0b9dSRichard Kuo .text : AT(ADDR(.text)) { 39e95bf452SRichard Kuo _text = .; 40e95bf452SRichard Kuo TEXT_TEXT 416fef087dSNathan Chancellor IRQENTRY_TEXT 426fef087dSNathan Chancellor SOFTIRQENTRY_TEXT 43e95bf452SRichard Kuo SCHED_TEXT 44e95bf452SRichard Kuo LOCK_TEXT 45e95bf452SRichard Kuo KPROBES_TEXT 46e95bf452SRichard Kuo *(.fixup) 47e95bf452SRichard Kuo } 48e95bf452SRichard Kuo _etext = .; 49e95bf452SRichard Kuo 50e95bf452SRichard Kuo INIT_DATA_SECTION(PAGE_SIZE) 51e95bf452SRichard Kuo 52e95bf452SRichard Kuo _sdata = .; 53c9174047SKees Cook RW_DATA(32,PAGE_SIZE,_THREAD_SIZE) 5493240b32SKees Cook RO_DATA(PAGE_SIZE) 55e95bf452SRichard Kuo _edata = .; 56e95bf452SRichard Kuo 57e95bf452SRichard Kuo EXCEPTION_TABLE(16) 58e95bf452SRichard Kuo 59e95bf452SRichard Kuo BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE) 60e95bf452SRichard Kuo 61e95bf452SRichard Kuo _end = .; 62e95bf452SRichard Kuo 63e95bf452SRichard Kuo STABS_DEBUG 64e95bf452SRichard Kuo DWARF_DEBUG 65c604abc3SKees Cook ELF_DETAILS 66*2e2f7a57SNathan Chancellor .hexagon.attributes 0 : { *(.hexagon.attributes) } 67e95bf452SRichard Kuo 68681ba73cSNathan Chancellor DISCARDS 69e95bf452SRichard Kuo} 70