mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
riscv: vdso: Prevent the compiler from inserting calls to memset()
[ Upstream commit bf40167d54d55d4b54d0103713d86a8638fb9290 ]
The compiler is smart enough to insert a call to memset() in
riscv_vdso_get_cpus(), which generates a dynamic relocation.
So prevent this by using -fno-builtin option.
Fixes: e2c0cdfba7
("RISC-V: User-facing API")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20241016083625.136311-2-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e79c1f1c91
commit
c19a0c171d
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
|
||||||
|
|
||||||
ccflags-y := -fno-stack-protector
|
ccflags-y := -fno-stack-protector
|
||||||
ccflags-y += -DDISABLE_BRANCH_PROFILING
|
ccflags-y += -DDISABLE_BRANCH_PROFILING
|
||||||
|
ccflags-y += -fno-builtin
|
||||||
|
|
||||||
ifneq ($(c-gettimeofday-y),)
|
ifneq ($(c-gettimeofday-y),)
|
||||||
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
|
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue