Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73088790 authored by Vincenzo Frascino's avatar Vincenzo Frascino Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: arm64: vdso: Add -fasynchronous-unwind-tables to cflags



On arm64 linux gcc uses -fasynchronous-unwind-tables -funwind-tables
by default since gcc-8, so now the de facto platform ABI is to allow
unwinding from async signal handlers.

However on bare metal targets (aarch64-none-elf), and on old gcc,
async and sync unwind tables are not enabled by default to avoid
runtime memory costs.

This means if linux is built with a baremetal toolchain the vdso.so
may not have unwind tables which breaks the gcc platform ABI guarantee
in userspace.

Add -fasynchronous-unwind-tables explicitly to the vgettimeofday.o
cflags to address the ABI change.

Fixes: 28b1a824a4f4 ("arm64: vdso: Substitute gettimeofday() with C implementation")
Cc: Will Deacon <will@kernel.org>
Reported-by: default avatarSzabolcs Nagy <szabolcs.nagy@arm.com>
Signed-off-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 1578e5d03112e3e9d37e1c4d95b6dfb734c73955)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I5dbd078b47b250e1bcc09538ec52f1a2ceaa1714
parent f821ce6b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ UBSAN_SANITIZE := n
OBJECT_FILES_NON_STANDARD	:= y
KCOV_INSTRUMENT			:= n

CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny
CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny -fasynchronous-unwind-tables

ifneq ($(c-gettimeofday-y),)
  CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)