Skip to content

Commit 3c1918c

Browse files
ihalippalmer-dabbelt
authored andcommitted
riscv: fix vdso build with lld
When building with the LLVM linker this error occurrs: LD arch/riscv/kernel/vdso/vdso-syms.o ld.lld: error: no input files This happens because the lld treats -R as an alias to -rpath, as opposed to ld where -R means --just-symbols. Use the long option name for compatibility between the two. Link: ClangBuiltLinux#805 Reported-by: Dmitry Golovin <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Ilie Halip <[email protected]> Reviewed-by: Fangrui Song <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent af2bdf8 commit 3c1918c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/riscv/kernel/vdso/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
3333
$(call if_changed,vdsold)
3434

3535
# We also create a special relocatable object that should mirror the symbol
36-
# table and layout of the linked DSO. With ld -R we can then refer to
37-
# these symbols in the kernel code rather than hand-coded addresses.
36+
# table and layout of the linked DSO. With ld --just-symbols we can then
37+
# refer to these symbols in the kernel code rather than hand-coded addresses.
3838

3939
SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
4040
-Wl,--build-id -Wl,--hash-style=both
4141
$(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE
4242
$(call if_changed,vdsold)
4343

44-
LDFLAGS_vdso-syms.o := -r -R
44+
LDFLAGS_vdso-syms.o := -r --just-symbols
4545
$(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
4646
$(call if_changed,ld)
4747

0 commit comments

Comments
 (0)