]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: vdso: Add --eh-frame-hdr to ldflags
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Thu, 7 May 2020 10:40:49 +0000 (11:40 +0100)
committerWill Deacon <will@kernel.org>
Thu, 7 May 2020 13:40:12 +0000 (14:40 +0100)
commit7bcbd795d1fed1af57cd86205776cb833af33db9
treedb98d188542314e33de29277e36d4e3c2a52571b
parent56d75fb40abade50b0876f0ec95f5d10326e27af
arm64: vdso: Add --eh-frame-hdr to ldflags

LLVM's unwinder depends on the .eh_frame_hdr being present for
unwinding. However, when compiling Linux with GCC, the section
is not present in the vdso library object and when compiling
with Clang, it is present, but it has zero length.

With GCC the problem was not spotted because libgcc unwinder does
not require the .eh_frame_hdr section to be present.

Add --eh-frame-hdr to ldflags to correctly generate and populate
the section for both GCC and LLVM.

Fixes: e124bab05b5aa ("arm64: vdso: Substitute gettimeofday() with C implementation")
Reported-by: Tamas Zsoldos <tamas.zsoldos@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Tested-by: Tamas Zsoldos <tamas.zsoldos@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20200507104049.47834-1-vincenzo.frascino@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/vdso/Makefile