Skip to content

Commit 1578e5d

Browse files
fvincenzoctmarinas
authored andcommitted
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: 28b1a82 ("arm64: vdso: Substitute gettimeofday() with C implementation") Cc: Will Deacon <[email protected]> Reported-by: Szabolcs Nagy <[email protected]> Signed-off-by: Vincenzo Frascino <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 6a8b55e commit 1578e5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ UBSAN_SANITIZE := n
3232
OBJECT_FILES_NON_STANDARD := y
3333
KCOV_INSTRUMENT := n
3434

35-
CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny
35+
CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny -fasynchronous-unwind-tables
3636

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

0 commit comments

Comments
 (0)