riscv: disable stack-protector for vDSO
PATCH 1/1 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.
--- arch/riscv/kernel/vdso/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/riscv/kernel/vdso/Makefile +2 -0
@@ -16,6 +16,8 @@ vdso-syms += flush_icache # Files to link into the vdso obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o +ccflags-y := -fno-stack-protector + ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y) endif
Signature · 7 lines
2.27.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
maintainerQuoted 20 lines · On Wed, 29 Jul 2020 00:51:29 PDT (-0700), [email protected] wrote:
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.
Signed-off-by Tobias Klauser <[email protected]>--- arch/riscv/kernel/vdso/Makefile | 2 ++ 1 file changed, 2 insertions(+)arch/riscv/kernel/vdso/Makefile +0
-0
arch/riscv/kernel/vdso/Makefile vdso-syms += flush_icache · line 23
Quoted 8 lines
arch/riscv/kernel/vdso/Makefile +2
-0@@ -16,6 +16,8 @@ vdso-syms += flush_icache # Files to link into the vdso obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o +ccflags-y := -fno-stack-protector + ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y) endif
Thanks, this is on fixes.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv