Not all toolchains generate symbols for the .livepatch.hooks.* sections,
neither those symbols are required by the livepatch loading logic in Xen to
find and process the hooks. Hooks in livepatch payloads are found and
processed based exclusively on section data.
The unconditional attempt to expect each hook serction to have a matching
symbol leads to a segmentation fault in create-diff-object when such symbol is
not present, as the code references a NULL pointer.
Fix this by not attempting to include symbols associated with hook sections.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
sym->sec->sym = NULL;
/* use section symbol instead */
rela->sym = sym->sec->secsym;
- } else {
- sec->secsym->include = 1;
}
}
}