]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: vdso: work-around broken ELF toolchains in Makefile
authorWill Deacon <will.deacon@arm.com>
Fri, 19 Jun 2015 12:56:33 +0000 (13:56 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 4 Jul 2015 03:02:34 +0000 (23:02 -0400)
commit23e190ff4438d82c47b7f3f6972cf592ac2c5915
tree82fd4d47f309cb274ff718ae78f3b2569bbd0dfa
parentc1f90226649f98f2c7dc38bc08a86a0bf9f27e9b
arm64: vdso: work-around broken ELF toolchains in Makefile

[ Upstream commit 6f1a6ae87c0c60d7c462ef8fd071f291aa7a9abb ]

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: <stable@vger.kernel.org>
Reported-by: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Reported-by: James Greenlaigh <james.greenhalgh@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/arm64/kernel/vdso/Makefile