From patchwork Fri Jun 9 16:03:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 9778865 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5752060393 for ; Fri, 9 Jun 2017 16:06:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42EBD2862D for ; Fri, 9 Jun 2017 16:06:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37CEE28639; Fri, 9 Jun 2017 16:06:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C43D92862D for ; Fri, 9 Jun 2017 16:06:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJMO3-0003GU-HP; Fri, 09 Jun 2017 16:03:47 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJMO2-0003GO-7t for xen-devel@lists.xen.org; Fri, 09 Jun 2017 16:03:46 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id D2/47-03620-1E6CA395; Fri, 09 Jun 2017 16:03:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRWlGSWpSXmKPExsXitHSDve7DY1a RBjdeMVss+biYxYHR4+ju30wBjFGsmXlJ+RUJrBlT12cWHGCr6N+3hL2B8SBrFyMHh4SAv8S9 n2FdjJwcbAIGErcufWcGsUUEZCVWd81hB7GZBeIl1s+ZyApiCws4SzRcamMCsVkEVCTetPSA1 fAK2EnsvNMBViMhICexdPt1sDlCAmoSb5efYYGoEZQ4OfMJC8RMCYmDL14wT2DknoUkNQtJag Ej0ypGjeLUorLUIl0jc72kosz0jJLcxMwcXUMDM73c1OLixPTUnMSkYr3k/NxNjMBAYACCHYy L1wYeYpTkYFIS5Z1WYBUpxJeUn1KZkVicEV9UmpNafIhRhoNDSYL381GgnGBRanpqRVpmDjAk YdISHDxKIrwtB4DSvMUFibnFmekQqVOMuhxNH7Z8YRJiycvPS5US5/0AMkMApCijNA9uBCw+L jHKSgnzMgIdJcRTkFqUm1mCKv+KUZyDUUmY1xZkCk9mXgncpldARzABHbHknQXIESWJCCmpBs YJf/R+y5uaG60+w6+RwrpRe+3yu8xubQ7m2xUZWBeYTnVNtwhRf1jdrC/dmla78Lxp1X6lN15 HTaWbef4GcgaEOibFnbCd5pK17vrDqb+tzXTPWPmnsYsWLz3bKDrDZoakwrJHJvPye2xXTPXw jjR9f9Ri6fLNPjvFb++6eIer/LLiq/lcMUosxRmJhlrMRcWJAC6dQZSKAgAA X-Env-Sender: prvs=3268e8fe2=ross.lagerwall@citrix.com X-Msg-Ref: server-3.tower-21.messagelabs.com!1497024223!69642744!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60736 invoked from network); 9 Jun 2017 16:03:44 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 9 Jun 2017 16:03:44 -0000 X-IronPort-AV: E=Sophos;i="5.39,317,1493683200"; d="scan'208";a="435832096" From: Ross Lagerwall To: Date: Fri, 9 Jun 2017 17:03:35 +0100 Message-ID: <20170609160336.13351-1-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 Cc: Ross Lagerwall Subject: [Xen-devel] [PATCH LIVEPATCH-BUILD-TOOLS 1/2] Ignore .discard sections X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Andrew Cooper Reviewed-by: Konrad Rzeszutek Wilk --- 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;