diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile index 8674e7e24c4a..ae3f80622f4c 100644 --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -105,7 +105,8 @@ KBUILD_CFLAGS += -fno-jump-tables endif KBUILD_RUSTFLAGS += --target=loongarch64-unknown-none-softfloat -KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=pic +KBUILD_RUSTFLAGS_KERNEL += -Zdirect-access-external-data=yes +KBUILD_RUSTFLAGS_MODULE += -Zdirect-access-external-data=no ifeq ($(CONFIG_RELOCATABLE),y) KBUILD_CFLAGS_KERNEL += -fPIE