path: root/arch/arm64/kernel/vdso/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2015-11-12arm64: build vdso without libgcovArnd Bergmann1-0/+3
On a cross-toolchain without glibc support, libgcov may not be available, and attempting to build an arm64 kernel with GCOV enabled then results in a build error: /home/arnd/cross-gcc/lib/gcc/aarch64-linux/5.2.1/../../../../aarch64-linux/bin/ld: cannot find -lgcov We don't really want to link libgcov into the vdso anyway, so this patch just disables GCOV in the vdso directory, just as we do for most other architectures. Signed-off-by: Arnd Bergmann <> Signed-off-by: Catalin Marinas <>
2015-06-19arm64: vdso: work-around broken ELF toolchains in MakefileWill Deacon1-0/+4
When building the kernel with a bare-metal (ELF) toolchain, the -shared option may not be passed down to collect2, resulting in silent corruption of the vDSO image (in particular, the DYNAMIC section is omitted). The effect of this corruption is that the dynamic linker fails to find the vDSO symbols and libc is instead used for the syscalls that we intended to optimise (e.g. gettimeofday). Functionally, there is no issue as the sigreturn trampoline is still intact and located by the kernel. This patch fixes the problem by explicitly passing -shared to the linker when building the vDSO. Cc: <> Reported-by: Szabolcs Nagy <> Reported-by: James Greenlaigh <> Signed-off-by: Will Deacon <> Signed-off-by: Catalin Marinas <>
2014-07-30arm64: vdso: fix build error when switching from LE to BEArun Chandran1-1/+1
Building a kernel with CPU_BIG_ENDIAN fails if there are stale objects from a !CPU_BIG_ENDIAN build. Due to a missing FORCE prerequisite on an if_changed rule in the VDSO Makefile, we attempt to link a stale LE object into the new BE kernel. According to Documentation/kbuild/makefiles.txt, FORCE is required for if_changed rules and forgetting it is a common mistake, so fix it by 'Forcing' the build of vdso. This patch fixes build errors like these: arch/arm64/kernel/vdso/note.o: compiled for a little endian system and target is big endian failed to merge target specific data of file arch/arm64/kernel/vdso/note.o arch/arm64/kernel/vdso/sigreturn.o: compiled for a little endian system and target is big endian failed to merge target specific data of file arch/arm64/kernel/vdso/sigreturn.o Tested-by: Mark Rutland <> Signed-off-by: Arun Chandran <> Signed-off-by: Will Deacon <>
2014-07-17arm64: Align the kbuild output for VDSOL and VDSOAIan Campbell1-2/+2
Signed-off-by: Ian Campbell <> Cc: Catalin Marinas <> Cc: Will Deacon <> Cc: Michal Marek <> Cc: Cc: Signed-off-by: Catalin Marinas <>
2014-02-04arm64: vdso: prevent ld from aligning PT_LOAD segments to 64kWill Deacon1-1/+1
Whilst the text segment for our VDSO is marked as PT_LOAD in the ELF headers, it is mapped by the kernel and not actually subject to demand-paging. ld doesn't realise this, and emits a p_align field of 64k (the maximum supported page size), which conflicts with the load address picked by the kernel on 4k systems, which will be 4k aligned. This causes GDB to fail with "Failed to read a valid object file image from memory" when attempting to load the VDSO. This patch passes the -n option to ld, which prevents it from aligning PT_LOAD segments to the maximum page size. Cc: <> Reported-by: Kyle McMartin <> Acked-by: Kyle McMartin <> Signed-off-by: Will Deacon <> Signed-off-by: Catalin Marinas <>
2012-09-17arm64: VDSO supportWill Deacon1-0/+63
This patch adds VDSO support for 64-bit applications. The VDSO code is currently used for sys_rt_sigreturn() and optimised gettimeofday() (using the user-accessible generic counter). Signed-off-by: Will Deacon <> Signed-off-by: Catalin Marinas <> Acked-by: Tony Lindgren <> Acked-by: Nicolas Pitre <> Acked-by: Olof Johansson <> Acked-by: Santosh Shilimkar <> Acked-by: Arnd Bergmann <>