* Support for runtime detection of the Svnapot extension. * Support for Zicboz when clearing pages. * We've moved to GENERIC_ENTRY. * Support for !MMU on rv32 systems. * The linear region is now mapped via huge pages. * Support for building relocatable kernels. * Support for the hwprobe interface. * Various fixes and cleanups throughout the tree. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmRL5rcTHHBhbG1lckBk YWJiZWx0LmNvbQAKCRAuExnzX7sYibpcD/0RnmO+N2OJxsJXf0KtHv4LlChAFaMZ mfcsU8lv8r3Rz1USJGyVoE57885R+iUw1664ic6Gj9Ll9/A+BDVyqlNeo1BZ7nnv 6hZawSh8XGMyCJoatjaCSMW6VKObsSpHXLoA0mxtj06w1XhtpUnzjv4SZQqBYxC2 7+/cfy6l3uGdSKQ0R402sF8PE+l3HthhO+Cw9NYHQZisAHEQrfFpXRnrovhs+vX0 aVxoWo8bmIhhNke2jh6dnGhfFfAs+UClbaKgZfe8af6feboo+Tal3+OibiEy1K1j hDQ3w/G5jAdwSqnNPdXzpk4srskUOhP9is8AG79vCasMxybQIBfZcc7/kLmmQX+2 xt1EoDVD/lSO1p+CWRautLXEsInWbpBYaSJie7WcR4SHe8S7/nomTDlwkJHx5cma mkSYHJKNwCbamDTI3gXg8nrScbxsRnJQsQUolFDwAeRz7AYVwtqVh8VxAWqAdU3q xUNKrUpCAzNC3d5GL7pmRfZrqjpQhuFXkHFSy85vaCPuckBu926OzxpKBmX4Kea1 qLYWfxv78bcwuY47FWJKcd97Ib63iBYDgarJxvrHrwDaHV2xjBOmdapNPUc2PswT a938enbYYnJHIbuSmbeNBPF4iF6nKUXshyfZu7tCZl6MzsXloUckGdm++j97Bpvr g6G3ZP6STSQBmw== =oxQd -----END PGP SIGNATURE----- Merge tag 'riscv-for-linus-6.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for runtime detection of the Svnapot extension - Support for Zicboz when clearing pages - We've moved to GENERIC_ENTRY - Support for !MMU on rv32 systems - The linear region is now mapped via huge pages - Support for building relocatable kernels - Support for the hwprobe interface - Various fixes and cleanups throughout the tree * tag 'riscv-for-linus-6.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (57 commits) RISC-V: hwprobe: Explicity check for -1 in vdso init RISC-V: hwprobe: There can only be one first riscv: Allow to downgrade paging mode from the command line dt-bindings: riscv: add sv57 mmu-type RISC-V: hwprobe: Remove __init on probe_vendor_features() riscv: Use --emit-relocs in order to move .rela.dyn in init riscv: Check relocations at compile time powerpc: Move script to check relocations at compile time in scripts/ riscv: Introduce CONFIG_RELOCATABLE riscv: Move .rela.dyn outside of init to avoid empty relocations riscv: Prepare EFI header for relocatable kernels riscv: Unconditionnally select KASAN_VMALLOC if KASAN riscv: Fix ptdump when KASAN is enabled riscv: Fix EFI stub usage of KASAN instrumented strcmp function riscv: Move DTB_EARLY_BASE_VA to the kernel address space riscv: Rework kasan population functions riscv: Split early and final KASAN population functions riscv: Use PUD/P4D/PGD pages for the linear mapping riscv: Move the linear mapping creation in its own function riscv: Get rid of riscv_pfn_base variable ...
83 lines
2.7 KiB
Makefile
83 lines
2.7 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Makefile for compat_vdso
|
|
#
|
|
|
|
# Symbols present in the compat_vdso
|
|
compat_vdso-syms = rt_sigreturn
|
|
compat_vdso-syms += getcpu
|
|
compat_vdso-syms += flush_icache
|
|
|
|
COMPAT_CC := $(CC)
|
|
COMPAT_LD := $(LD)
|
|
|
|
COMPAT_CC_FLAGS := -march=rv32g -mabi=ilp32
|
|
COMPAT_LD_FLAGS := -melf32lriscv
|
|
|
|
# Disable attributes, as they're useless and break the build.
|
|
COMPAT_CC_FLAGS += $(call cc-option,-mno-riscv-attribute)
|
|
COMPAT_CC_FLAGS += $(call as-option,-Wa$(comma)-mno-arch-attr)
|
|
|
|
# Files to link into the compat_vdso
|
|
obj-compat_vdso = $(patsubst %, %.o, $(compat_vdso-syms)) note.o
|
|
|
|
# Build rules
|
|
targets := $(obj-compat_vdso) compat_vdso.so compat_vdso.so.dbg compat_vdso.lds
|
|
obj-compat_vdso := $(addprefix $(obj)/, $(obj-compat_vdso))
|
|
|
|
obj-y += compat_vdso.o
|
|
CPPFLAGS_compat_vdso.lds += -P -C -DCOMPAT_VDSO -U$(ARCH)
|
|
|
|
# Disable profiling and instrumentation for VDSO code
|
|
GCOV_PROFILE := n
|
|
KCOV_INSTRUMENT := n
|
|
KASAN_SANITIZE := n
|
|
UBSAN_SANITIZE := n
|
|
|
|
# Force dependency
|
|
$(obj)/compat_vdso.o: $(obj)/compat_vdso.so
|
|
|
|
# link rule for the .so file, .lds has to be first
|
|
$(obj)/compat_vdso.so.dbg: $(obj)/compat_vdso.lds $(obj-compat_vdso) FORCE
|
|
$(call if_changed,compat_vdsold)
|
|
LDFLAGS_compat_vdso.so.dbg = -shared -S -soname=linux-compat_vdso.so.1 \
|
|
--build-id=sha1 --hash-style=both --eh-frame-hdr
|
|
|
|
$(obj-compat_vdso): %.o: %.S FORCE
|
|
$(call if_changed_dep,compat_vdsoas)
|
|
|
|
# strip rule for the .so file
|
|
$(obj)/%.so: OBJCOPYFLAGS := -S
|
|
$(obj)/%.so: $(obj)/%.so.dbg FORCE
|
|
$(call if_changed,objcopy)
|
|
|
|
# Generate VDSO offsets using helper script
|
|
gen-compat_vdsosym := $(srctree)/$(src)/gen_compat_vdso_offsets.sh
|
|
quiet_cmd_compat_vdsosym = VDSOSYM $@
|
|
cmd_compat_vdsosym = $(NM) $< | $(gen-compat_vdsosym) | LC_ALL=C sort > $@
|
|
|
|
include/generated/compat_vdso-offsets.h: $(obj)/compat_vdso.so.dbg FORCE
|
|
$(call if_changed,compat_vdsosym)
|
|
|
|
# actual build commands
|
|
# The DSO images are built using a special linker script
|
|
# Make sure only to export the intended __compat_vdso_xxx symbol offsets.
|
|
quiet_cmd_compat_vdsold = VDSOLD $@
|
|
cmd_compat_vdsold = $(COMPAT_LD) $(ld_flags) $(COMPAT_LD_FLAGS) -T $(filter-out FORCE,$^) -o $@.tmp && \
|
|
$(OBJCOPY) $(patsubst %, -G __compat_vdso_%, $(compat_vdso-syms)) $@.tmp $@ && \
|
|
rm $@.tmp
|
|
|
|
# actual build commands
|
|
quiet_cmd_compat_vdsoas = VDSOAS $@
|
|
cmd_compat_vdsoas = $(COMPAT_CC) $(a_flags) $(COMPAT_CC_FLAGS) -c -o $@ $<
|
|
|
|
# install commands for the unstripped file
|
|
quiet_cmd_compat_vdso_install = INSTALL $@
|
|
cmd_compat_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/compat_vdso/$@
|
|
|
|
compat_vdso.so: $(obj)/compat_vdso.so.dbg
|
|
@mkdir -p $(MODLIB)/compat_vdso
|
|
$(call cmd,compat_vdso_install)
|
|
|
|
compat_vdso_install: compat_vdso.so
|