forked from luck/tmp_suning_uos_patched
MIPS: Disable VDSO time functionality on microMIPS
A check we're about to add to pick up on function calls that depend on bogus use of the GOT in the VDSO picked up on instances of such function calls in microMIPS builds. Since the code appears genuinely problematic, and given the relatively small amount of use & testing that microMIPS sees, go ahead & disable the VDSO for microMIPS builds. Signed-off-by: Paul Burton <paulburton@kernel.org>
This commit is contained in:
parent
d3f703c435
commit
07015d7a10
|
@ -52,6 +52,8 @@ endif
|
||||||
|
|
||||||
CFLAGS_REMOVE_vgettimeofday.o = -pg
|
CFLAGS_REMOVE_vgettimeofday.o = -pg
|
||||||
|
|
||||||
|
DISABLE_VDSO := n
|
||||||
|
|
||||||
#
|
#
|
||||||
# For the pre-R6 code in arch/mips/vdso/vdso.h for locating
|
# For the pre-R6 code in arch/mips/vdso/vdso.h for locating
|
||||||
# the base address of VDSO, the linker will emit a R_MIPS_PC32
|
# the base address of VDSO, the linker will emit a R_MIPS_PC32
|
||||||
|
@ -65,11 +67,24 @@ CFLAGS_REMOVE_vgettimeofday.o = -pg
|
||||||
ifndef CONFIG_CPU_MIPSR6
|
ifndef CONFIG_CPU_MIPSR6
|
||||||
ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
|
ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
|
||||||
$(warning MIPS VDSO requires binutils >= 2.25)
|
$(warning MIPS VDSO requires binutils >= 2.25)
|
||||||
obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y))
|
DISABLE_VDSO := y
|
||||||
ccflags-vdso += -DDISABLE_MIPS_VDSO
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# GCC (at least up to version 9.2) appears to emit function calls that make use
|
||||||
|
# of the GOT when targeting microMIPS, which we can't use in the VDSO due to
|
||||||
|
# the lack of relocations. As such, we disable the VDSO for microMIPS builds.
|
||||||
|
#
|
||||||
|
ifdef CONFIG_CPU_MICROMIPS
|
||||||
|
DISABLE_VDSO := y
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(DISABLE_VDSO),y)
|
||||||
|
obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y))
|
||||||
|
ccflags-vdso += -DDISABLE_MIPS_VDSO
|
||||||
|
endif
|
||||||
|
|
||||||
# VDSO linker flags.
|
# VDSO linker flags.
|
||||||
VDSO_LDFLAGS := \
|
VDSO_LDFLAGS := \
|
||||||
-Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 \
|
-Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user