Commit e703de76 authored by Cui GaoSheng's avatar Cui GaoSheng Committed by Zheng Zengkai
Browse files

arm32: kaslr: Fix the bug of hidden symbols when decompressing code is compiled



hulk inclusion
category: bugfix
bugzilla: 47952
CVE: NA

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

Fix the bug of hidden symbols when decompressing code is compiled,
we can't enable hidden cflags because decompressed code needs to
support symbol relocation.

Signed-off-by: default avatarCui GaoSheng <cuigaosheng1@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 6bc05b0a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -113,6 +113,11 @@ targets := vmlinux vmlinux.lds piggy_data piggy.o \

clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S

ifeq ($(CONFIG_RELOCATABLE),y)
HIDDEN_STR := -include $(srctree)/include/linux/hidden.h
KBUILD_CFLAGS := $(subst $(HIDDEN_STR), , $(KBUILD_CFLAGS))
endif

KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING

ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
+0 −4
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
#define _LINUX_STRING_H_

#ifdef CONFIG_RANDOMIZE_BASE
#pragma GCC visibility pop
#endif

#include <linux/compiler.h>	/* for inline */
#include <linux/types.h>	/* for size_t */
#include <linux/stddef.h>	/* for NULL */
+0 −4
Original line number Diff line number Diff line
@@ -16,10 +16,6 @@
 *  which should point to addresses in RAM and cleared to 0 on start.
 *  This allows for a much quicker boot time.
 */
#ifdef CONFIG_RANDOMIZE_BASE
#pragma GCC visibility pop
#endif

unsigned int __machine_arch_type;

#include <linux/compiler.h>	/* for inline */