xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH LIVEPATCH-BUILD-TOOLS 1/2] Ignore .discard sections
@ 2017-06-09 16:03 Ross Lagerwall
  2017-06-09 16:03 ` [PATCH LIVEPATCH-BUILD-TOOLS 2/2] Remove section alignment requirement Ross Lagerwall
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ross Lagerwall @ 2017-06-09 16:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Ross Lagerwall

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.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 create-diff-object.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/create-diff-object.c b/create-diff-object.c
index 217e58f..ba19daf 100644
--- a/create-diff-object.c
+++ b/create-diff-object.c
@@ -888,6 +888,14 @@ static void kpatch_mark_ignored_sections(struct kpatch_elf *kelf)
 	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;
-- 
2.9.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-06-12  7:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 16:03 [PATCH LIVEPATCH-BUILD-TOOLS 1/2] Ignore .discard sections Ross Lagerwall
2017-06-09 16:03 ` [PATCH LIVEPATCH-BUILD-TOOLS 2/2] Remove section alignment requirement Ross Lagerwall
2017-06-09 16:25   ` Andrew Cooper
2017-06-09 16:38   ` Konrad Rzeszutek Wilk
2017-06-09 17:00     ` Andrew Cooper
2017-06-09 17:08       ` Konrad Rzeszutek Wilk
2017-06-12  7:30         ` Ross Lagerwall
2017-06-09 16:25 ` [PATCH LIVEPATCH-BUILD-TOOLS 1/2] Ignore .discard sections Andrew Cooper
2017-06-09 16:35 ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).