summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/vdso
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2014-07-09 19:22:13 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2014-07-17 16:18:57 +0100
commit601255ae3c98fdeeee3a8bb4696425e4f868b4f1 (patch)
tree02f118302b7d2f01c0ee35a026e406976c23fc73 /arch/arm64/kernel/vdso
parent2fea7f6c98f5957e539eb8aa0ce849729b900342 (diff)
downloadlinux-601255ae3c98fdeeee3a8bb4696425e4f868b4f1.tar.gz
linux-601255ae3c98fdeeee3a8bb4696425e4f868b4f1.tar.bz2
linux-601255ae3c98fdeeee3a8bb4696425e4f868b4f1.zip
arm64: vdso: move data page before code pages
Andy pointed out that binutils generates additional sections in the vdso image (e.g. section string table) which, if our .text section gets big enough, could cross a page boundary and end up screwing up the location where the kernel expects to put the data page. This patch solves the issue in the same manner as x86_32, by moving the data page before the code pages. Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/vdso')
-rw-r--r--arch/arm64/kernel/vdso/vdso.lds.S4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
index 8154b8d1c826..beca249bc2f3 100644
--- a/arch/arm64/kernel/vdso/vdso.lds.S
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
@@ -28,6 +28,7 @@ OUTPUT_ARCH(aarch64)
SECTIONS
{
+ PROVIDE(_vdso_data = . - PAGE_SIZE);
. = VDSO_LBASE + SIZEOF_HEADERS;
.hash : { *(.hash) } :text
@@ -57,9 +58,6 @@ SECTIONS
_end = .;
PROVIDE(end = .);
- . = ALIGN(PAGE_SIZE);
- PROVIDE(_vdso_data = .);
-
/DISCARD/ : {
*(.note.GNU-stack)
*(.data .data.* .gnu.linkonce.d.* .sdata*)