]> www.infradead.org Git - users/willy/xarray.git/commit
LoongArch: Use rustc option -Zdirect-access-external-data
authorWANG Rui <wangrui@loongson.cn>
Sat, 20 Jul 2024 14:41:07 +0000 (22:41 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 20 Jul 2024 14:41:07 +0000 (22:41 +0800)
commit0d3a6322021b8c98527842518eeb685f3a8761c8
tree130054f3c4f218b7998e9de8891f3ed97e1fc8a3
parente05d4cd9b895c503dcf19c0ed9ebb8d393b220ec
LoongArch: Use rustc option -Zdirect-access-external-data

-Zdirect-access-external-data is a new Rust compiler option added in
Rust 1.78, which we use to optimize the access of external data in the
Linux kernel's Rust code. This patch modifies the Rust code in vmlinux
to directly access externa data, using PC-REL instead of GOT. However,
Rust code whithin modules is constrained by the PC-REL addressing range
and is explicitly set to use an indirect method.

Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Makefile