]> xenbits.xensource.com Git - livepatch-build-tools.git/commit
livepatch-build: detect special section group sizes
authorPawel Wieczorkiewicz <wipawel@amazon.de>
Wed, 21 Aug 2019 08:20:44 +0000 (08:20 +0000)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Thu, 22 Aug 2019 14:27:25 +0000 (15:27 +0100)
commit40f3705cfff816a780f3b7fd8585d75e0701ec9c
tree1566906042ab6a25e4ac1f134e2e25bafede8dfe
parent6e13a7237db5c8d379482d9f6bd4cbf951f966f3
livepatch-build: detect special section group sizes

Hard-coding the special section group sizes is unreliable. Instead,
determine them dynamically by finding the related struct definitions
in the DWARF metadata.

This is a livepatch backport of kpatch upstream commit [1]:
kpatch-build: detect special section group sizes 170449847136a48b19fc

Xen only deals with alt_instr, bug_frame and exception_table_entry
structures, so sizes of these structures are obtained from xen-syms.

This change is needed since with recent Xen the alt_instr structure
has changed size from 12 to 14 bytes.

[1] https://github.com/jpoimboe/kpatch/commit/170449847136a48b19fcceb19c1d4d257d386b56

Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Martin Mazein <amazein@amazon.de>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
create-diff-object.c
livepatch-build