]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: vdso: prevent ld from aligning PT_LOAD segments to 64k
authorWill Deacon <will.deacon@arm.com>
Tue, 4 Feb 2014 14:41:26 +0000 (14:41 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 4 Feb 2014 17:52:47 +0000 (17:52 +0000)
commit329c603bed4c8264ad016495259c581e90362946
tree015487982807450900988f1e35b437a6f05f2f3a
parented4c0e42e851d5178cd0d1dc05de408325576e1c
arm64: vdso: prevent ld from aligning PT_LOAD segments to 64k

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: <stable@vger.kernel.org>
Reported-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/vdso/Makefile