Ignore differences in discard sections. They are not included in the final xen
binary so there is no need to include them in the live patch.
This was discovered when building a live patch for XSA-213. Before this
commit, it failed with 'changed section .discard not selected for
inclusion'.
Reported-by: Sarah Newman <srn@prgmr.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
struct rela *rela;
char *name;
+ /* Always ignore .discard sections */
+ sec = find_section_by_name(&kelf->sections, ".discard");
+ if (sec) {
+ sec->ignore = 1;
+ if (sec->twin)
+ sec->twin->ignore = 1;
+ }
+
sec = find_section_by_name(&kelf->sections, ".livepatch.ignore.sections");
if (!sec)
return;