xref: /linux/arch/arm64/kvm/hyp/nvhe/hyp.lds.S (revision 8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17)
1ab25464bSDavid Brazdil/* SPDX-License-Identifier: GPL-2.0 */
2ab25464bSDavid Brazdil/*
3ab25464bSDavid Brazdil * Copyright (C) 2020 Google LLC.
4ab25464bSDavid Brazdil * Written by David Brazdil <dbrazdil@google.com>
5ab25464bSDavid Brazdil *
6ab25464bSDavid Brazdil * Linker script used for partial linking of nVHE EL2 object files.
7ab25464bSDavid Brazdil */
8ab25464bSDavid Brazdil
9ab25464bSDavid Brazdil#include <asm/hyp_image.h>
1030c95391SDavid Brazdil#include <asm-generic/vmlinux.lds.h>
1130c95391SDavid Brazdil#include <asm/cache.h>
1230c95391SDavid Brazdil#include <asm/memory.h>
13ab25464bSDavid Brazdil
14ab25464bSDavid BrazdilSECTIONS {
15eceaf38fSDavid Brazdil	HYP_SECTION(.idmap.text)
16ab25464bSDavid Brazdil	HYP_SECTION(.text)
1716174eeaSDavid Brazdil	HYP_SECTION(.data..ro_after_init)
1816174eeaSDavid Brazdil	HYP_SECTION(.rodata)
1916174eeaSDavid Brazdil
207bab16a6SJamie Iles	/*
217bab16a6SJamie Iles	 * .hyp..data..percpu needs to be page aligned to maintain the same
227bab16a6SJamie Iles	 * alignment for when linking into vmlinux.
237bab16a6SJamie Iles	 */
247bab16a6SJamie Iles	. = ALIGN(PAGE_SIZE);
25f7a4825dSDavid Brazdil	BEGIN_HYP_SECTION(.data..percpu)
2630c95391SDavid Brazdil		PERCPU_INPUT(L1_CACHE_BYTES)
27f7a4825dSDavid Brazdil	END_HYP_SECTION
28*380e18adSQuentin Perret	HYP_SECTION(.bss)
29ab25464bSDavid Brazdil}
30