]> xenbits.xensource.com Git - livepatch-build-tools.git/commit
create-diff-object: don't include symbols for .livepatch.hooks.* sections
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 6 Nov 2024 16:50:24 +0000 (17:50 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Tue, 21 Jan 2025 13:11:05 +0000 (14:11 +0100)
commitcec5394e3c327d431cd482fd68ee5dde374bc470
tree1f3891337af339b7b1bb81fb4349ef77bfcfff0d
parenta8100e071b9f6955f33c6475ffc70b69b6ee1068
create-diff-object: don't include symbols for .livepatch.hooks.* sections

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>
create-diff-object.c