]> xenbits.xensource.com Git - livepatch-build-tools.git/commit
create-diff-object: more precisely identify .rodata sections
authorPawel Wieczorkiewicz <wipawel@amazon.de>
Tue, 5 Nov 2019 15:37:45 +0000 (15:37 +0000)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Tue, 26 Nov 2019 10:53:44 +0000 (10:53 +0000)
commitdabc4e9fa87ce2c029e828bd690cd8f689b71635
treed98d941d866220dc2df59113d853a9c2e92540e5
parentad79fdabd57f9b74828816920dd3765ed10d804f
create-diff-object: more precisely identify .rodata sections

This is needed for more precise patchability verification.
Only non-special .rodata sections should be subject
for such a non-referenced check in kpatch_verify_patchability().
Current check (non-standard, non-rela, non-debug) is too weak and
allows also non-rodata sections without referenced symbols to slip
through.

Detect .rodata section by checking section's type (SHT_PROGBITS),
flags (no exec, no write) and finally name prefix.

Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Andra-Irina Paraschiv <andraprs@amazon.com>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Norbert Manthey <nmanthey@amazon.de>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
common.c
common.h
create-diff-object.c