Skip to content

Commit 8919975

Browse files
committed
MIPS: VDSO: Fix build for binutils < 2.25
Versions of binutils prior to 2.25 are unable to link our VDSO due to an unsupported R_MIPS_PC32 relocation generated by the ".word _start - ." line of the inline asm in get_vdso_base(). As such, the intent is that when building with binutils older than 2.25 we don't build code for gettimeofday() & friends in the VDSO that rely upon get_vdso_base(). Commit 24640f2 ("mips: Add support for generic vDSO") converted us to using generic VDSO infrastructure, and as part of that the gettimeofday() functionality moved to a new vgettimeofday.c file. The check for binutils < 2.25 wasn't updated to handle this new filename, and so it continues trying to remove the old unused filename from the build. The end result is that we try to include the gettimeofday() code in builds that will fail to link. Fix this by updating the binutils < 2.25 case to remove vgettimeofday.c from obj-vdso-y, rather than gettimeofday.c. Signed-off-by: Paul Burton <[email protected]> Fixes: 24640f2 ("mips: Add support for generic vDSO") Cc: Vincenzo Frascino <[email protected]> Cc: [email protected]
1 parent 9080028 commit 8919975

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/vdso/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ CFLAGS_REMOVE_vgettimeofday.o = -pg
5959
ifndef CONFIG_CPU_MIPSR6
6060
ifeq ($(call ld-ifversion, -lt, 225000000, y),y)
6161
$(warning MIPS VDSO requires binutils >= 2.25)
62-
obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
62+
obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y))
6363
ccflags-vdso += -DDISABLE_MIPS_VDSO
6464
endif
6565
endif

0 commit comments

Comments
 (0)