rodata: optimize memory usage of rodata section [4/5]

PD#SWPL-31258

Problem:
Kernel RO data is too large, about 4.5mb on 32bit and 5.9mb on
64bit kernel

Solution:
1, optimize kallsyms compress code. This can help to increase
about 18% of compress ratio and save about 200 ~ 500KB under
different config.

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: I4c058fbb22d89bc50c81fa3266ee0f7613f076f2
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
This commit is contained in:
Tao Zeng
2020-08-07 21:03:48 +08:00
committed by Chris
parent 5b574c9eda
commit 2a7548129f
5 changed files with 2415 additions and 174 deletions

View File

@@ -11,7 +11,11 @@
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
#ifdef CONFIG_AMLOGIC_MODIFY
hostprogs-$(CONFIG_KALLSYMS) += kallsyms_aml
#else
hostprogs-$(CONFIG_KALLSYMS) += kallsyms
#endf
hostprogs-$(CONFIG_LOGO) += pnmtologo
hostprogs-$(CONFIG_VT) += conmakehash
hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount

2157
scripts/kallsyms_aml.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -202,7 +202,12 @@ kallsyms()
local afile="`basename ${2} .o`.S"
${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${afile}
# using higher compress ration version
if [ -n "{CONFIG_AMLOGIC_MODIFY}" ]; then
${NM} -n ${1} | scripts/kallsyms_aml ${kallsymopt} > ${afile}
else
${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${afile}
fi
${CC} ${aflags} -c -o ${2} ${afile}
}