From: Cui GaoSheng
ohos inclusion
category: bugfix
issue: #I3ZXZF
CVE: NA
------------------------------------------------------------------------
Linux can't enable fpic to compile modules, because the modules
have their own relocation table, and they can't use the got table
for symbolic addressing.
Signed-off-by: Cui GaoSheng
Reviewed-by: Xiu Jianfeng
Signed-off-by: Chen Jun
Signed-off-by: Yu Changchun
---
arch/arm/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 4f550fc0e811..cb7c6b02fede 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -50,6 +50,7 @@ endif
ifeq ($(CONFIG_RELOCATABLE),y)
KBUILD_CFLAGS += -fpic -include $(srctree)/include/linux/hidden.h
+CFLAGS_MODULE += -fno-pic
LDFLAGS_vmlinux += -pie -shared -Bsymbolic
endif
--
2.22.0