Skip to content

Commit 7e9f5e6

Browse files
fvincenzowilldeacon
authored andcommitted
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: 28b1a82 ("arm64: vdso: Substitute gettimeofday() with C implementation") Reported-by: Tamas Zsoldos <[email protected]> Signed-off-by: Vincenzo Frascino <[email protected]> Tested-by: Tamas Zsoldos <[email protected]> Cc: Will Deacon <[email protected]> Cc: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 1d09094 commit 7e9f5e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/vdso/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
2222
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
2323
# preparation in build-time C")).
2424
ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
25-
-Bsymbolic --build-id -n -T
25+
-Bsymbolic --eh-frame-hdr --build-id -n -T
2626

2727
ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
2828
ccflags-y += -DDISABLE_BRANCH_PROFILING

0 commit comments

Comments
 (0)