Commit 952cadd1 authored by Li Lingfeng's avatar Li Lingfeng Committed by Jialin Zhang
Browse files

kabi: deduplication friendly structs

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8LQBH

Reference: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/commit/2843fcb40c63193ad87bf3af2bac67006924bc1e



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

We don't really need the field names to be globally unique, it is enough
when they are unique in the given struct. Since structs do not generally
span mutliple files, using the line number is enough to ensure an unique
identifier. It means that we can't use two KABI_RENAME macros on the same
line but that's not happening anyway.

This allows pahole to deduplicate the type info of structs using KABI
macros, lowering the size of vmlinuz from 26M to 8.5

Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarzhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 550f14a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment