riscv: Add -fPIC option to CFLAGS_vgettimeofday.o
A message that is not in the archive (sent off-list or not yet received): [email protected]
Palmer Dabbelt
maintainerQuoted 17 lines · On Mon, 22 Jun 2020 18:13:22 PDT (-0700), [email protected] wrote:
The time related vDSO functions use a variable,
vdso_data, to access the vDSO data page to get the system time information. Because thevdso_datafor CFLAGS_vgettimeofday.o is an external variable defined in vdso.o, the CFLAGS_vgettimeofday.o should be compiled with -fPIC to ensure thatvdso_datais addressable.Reported-by kernel test robot <[email protected]>Signed-off-by Vincent Chen <[email protected]>--- arch/riscv/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)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 +1
-1@@ -17,7 +17,7 @@ vdso-syms += flush_icache obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o ifneq ($(c-gettimeofday-y),) - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y) + CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y) endif # Build rules
Presumably this should apply to all the C files compiled into the VDSO, but as that's the only one this is fine for now. I don't know enough build system wizardry to make that happen, so I guess we'll have to wait until we get a second C file :)
This is on fixes.
Thanks!
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv