kpatch/s390: Add additional bundled symbols.

1. static const struct inet_sock fake_sk = {
	/* makes ip6_route_output set RT6_LOOKUP_F_IFACE: */
	.sk.sk_bound_dev_if = 1,
	.pinet6 = (struct ipv6_pinfo *) &fake_pinfo,
};

gcc can place fake_sk in .data.rel.ro.local:
ndx 38, data 0x3ffb3280a58, size 960, name .data.rel.ro.local.fake_sk.1
ndx 39, data 0x3ffb32be5e8, size 24, name .rela.data.rel.ro.local.fake_sk.1

2. static LIST_HEAD(patch_objects);

gcc can place patch_objects relocation in .data.rel.local:
sym 56, type 1, bind 0, ndx 34, name patch_objects -> .data.rel.local

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
This commit is contained in:
Sumanth Korikkar 2022-03-29 10:20:47 +02:00
parent eb4a85f778
commit b0330ab18e
1 changed files with 10 additions and 0 deletions

View File

@ -118,6 +118,16 @@ static bool is_bundleable(struct symbol *sym)
!strcmp(sym->sec->name + 13, sym->name))
return true;
if (sym->type == STT_OBJECT &&
!strncmp(sym->sec->name, ".data.rel.ro.local.", 19) &&
!strcmp(sym->sec->name + 19, sym->name))
return 1;
if (sym->type == STT_OBJECT &&
!strncmp(sym->sec->name, ".data.rel.local.", 16) &&
!strcmp(sym->sec->name + 16, sym->name))
return 1;
if (sym->type == STT_OBJECT &&
!strncmp(sym->sec->name, ".rodata.",8) &&
!strcmp(sym->sec->name + 8, sym->name))