Skip to content

Commit c6898d6

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: Check that vdso does not contain any dynamic relocations
Like other architectures, use the common cmd_vdso_check to make sure of that. Reviewed-by: Björn Töpel <bjorn@rivosinc.com> Tested-by: Vladimir Isaev <vladimir.isaev@syntacore.com> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20241016083625.136311-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent bf40167 commit c6898d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/riscv/kernel/vdso/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $(obj)/vdso.o: $(obj)/vdso.so
4545

4646
# link rule for the .so file, .lds has to be first
4747
$(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
48-
$(call if_changed,vdsold)
48+
$(call if_changed,vdsold_and_check)
4949
LDFLAGS_vdso.so.dbg = -shared -soname=linux-vdso.so.1 \
5050
--build-id=sha1 --hash-style=both --eh-frame-hdr
5151

@@ -65,7 +65,8 @@ include/generated/vdso-offsets.h: $(obj)/vdso.so.dbg FORCE
6565
# actual build commands
6666
# The DSO images are built using a special linker script
6767
# Make sure only to export the intended __vdso_xxx symbol offsets.
68-
quiet_cmd_vdsold = VDSOLD $@
69-
cmd_vdsold = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@.tmp && \
68+
quiet_cmd_vdsold_and_check = VDSOLD $@
69+
cmd_vdsold_and_check = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@.tmp && \
7070
$(OBJCOPY) $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \
71-
rm $@.tmp
71+
rm $@.tmp && \
72+
$(cmd_vdso_check)

0 commit comments

Comments
 (0)