提交 ac6cc7ae 编写于 作者: C Cui GaoSheng 提交者: Jialin Zhang

arm32: kaslr: Avoid using the -fpic and fno-pic parameters together

hulk inclusion
category: bugfix
bugzilla: 188368 https://gitee.com/openeuler/kernel/issues/I6EEK7
CVE: NA

--------------------------------

Avoid using conflicting compilation parameters during compilation,
so we move -fpic from KBUILD_CFLAGS to CFLAGS_KERNEL to avoid
using -fpic and fno-pic parameters together.

Fixes: 6bc05b0a ("arm32: kaslr: Fix the bug of module install failure")
Signed-off-by: NCui GaoSheng <cuigaosheng1@huawei.com>
Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
上级 4fb7890c
...@@ -49,7 +49,8 @@ KBUILD_LDFLAGS += -EL ...@@ -49,7 +49,8 @@ KBUILD_LDFLAGS += -EL
endif endif
ifeq ($(CONFIG_RELOCATABLE),y) ifeq ($(CONFIG_RELOCATABLE),y)
KBUILD_CFLAGS += -fpic -include $(srctree)/include/linux/hidden.h KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h
CFLAGS_KERNEL += -fpic
CFLAGS_MODULE += -fno-pic CFLAGS_MODULE += -fno-pic
LDFLAGS_vmlinux += -pie -shared -Bsymbolic LDFLAGS_vmlinux += -pie -shared -Bsymbolic
endif endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册