]> xenbits.xensource.com Git - people/wipawel/livepatch-build-tools/commit
livepatch-build: detect special section group sizes
authorPawel Wieczorkiewicz <wipawel@amazon.de>
Fri, 21 Sep 2018 10:44:10 +0000 (10:44 +0000)
committerPawel Wieczorkiewicz <wipawel@amazon.de>
Thu, 8 Aug 2019 08:32:27 +0000 (08:32 +0000)
commitd8cc8591d63734c85baa4ed61cbef9c033d34e6c
treedf16e65d88fc16987838fc54af0b263d8d0073c1
parentef3437d3c300ededc6f66f13d08d1083109b6f58
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>
create-diff-object.c
livepatch-build