LoongArch: Disable module from accessing external data directly
authorWANG Rui <wangrui@loongson.cn>
Wed, 8 Nov 2023 06:12:07 +0000 (14:12 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 8 Nov 2023 06:12:07 +0000 (14:12 +0800)
commit21eb2bfe2748b238f06983e4308cb30611371605
treee9fa23ddd343ac50788360d9b53c29ba454ad120
parent80c7889de7a8246e44a9632a2b7d15b41ab3fe41
LoongArch: Disable module from accessing external data directly

The distance between vmlinux and the module is too far so that PC-REL
cannot be accessed directly, only GOT.

When compiling module with GCC, the option `-mdirect-extern-access` is
disabled by default. The Clang option `-fdirect-access-external-data` is
enabled by default, so it needs to be explicitly disabled.

Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Makefile