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>