Skip to content

Commit 40284a0

Browse files
tklauserpalmer-dabbelt
authored andcommitted
riscv: disable stack-protector for vDSO
Currently, building the vDSO with clang leads assembler errors like the following: /tmp/vgettimeofday-1ae0d2.s: Assembler messages: /tmp/vgettimeofday-1ae0d2.s:28: Error: bad expression /tmp/vgettimeofday-1ae0d2.s:28: Error: illegal operands `auipc a2,%got_pcrel_hi(__stack_chk_guard)' Disable the stack-protector for vDSO to fix these. Link: ClangBuiltLinux/linux#1112 Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 635093e commit 40284a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/kernel/vdso/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ vdso-syms += flush_icache
1616
# Files to link into the vdso
1717
obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
1818

19+
ccflags-y := -fno-stack-protector
20+
1921
ifneq ($(c-gettimeofday-y),)
2022
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
2123
endif

0 commit comments

Comments
 (0)