diff mbox

[LIVEPATCH-BUILD-TOOLS,1/2] Ignore .discard sections

Message ID 20170609160336.13351-1-ross.lagerwall@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ross Lagerwall June 9, 2017, 4:03 p.m. UTC
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(+)

Comments

Andrew Cooper June 9, 2017, 4:25 p.m. UTC | #1
On 09/06/17 17:03, Ross Lagerwall wrote:
> 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>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Konrad Rzeszutek Wilk June 9, 2017, 4:35 p.m. UTC | #2
On Fri, Jun 09, 2017 at 05:03:35PM +0100, Ross Lagerwall wrote:
> 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>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

(And CC-ing Sarah)
> ---
>  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
>
diff mbox

Patch

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;