From patchwork Wed Aug 21 08:20:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 11106041 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37CFA1395 for ; Wed, 21 Aug 2019 08:22:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 145592339E for ; Wed, 21 Aug 2019 08:22:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.de header.i=@amazon.de header.b="S3Tes9wm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 145592339E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0LsN-0001nT-5I; Wed, 21 Aug 2019 08:21:51 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0LsM-0001ld-D4 for xen-devel@lists.xen.org; Wed, 21 Aug 2019 08:21:50 +0000 X-Inumbo-ID: b03afb32-c3ec-11e9-adc2-12813bfff9fa Received: from smtp-fw-6001.amazon.com (unknown [52.95.48.154]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b03afb32-c3ec-11e9-adc2-12813bfff9fa; Wed, 21 Aug 2019 08:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1566375694; x=1597911694; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=qqeo8XhVoqzWKP+lXIzjkBD7UidvojG69bSEW5ONYfw=; b=S3Tes9wmXbgvR5l3FHLlt0q3Qe7QmuMhnnC9B9YaCg2LzqfIKWPMqLgb IkQQGOjFUZeCM2rIzSkxT4LwJSRP+LElKTzFFv+BIW+RgD/3J2byWFCKf hZKU+W3c49MrKYb4iG7uA57pKFdv32mYUnwVcTwcyIqizzT5/BV+19+iw k=; X-IronPort-AV: E=Sophos;i="5.64,412,1559520000"; d="scan'208";a="410765154" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2a-8549039f.us-west-2.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 21 Aug 2019 08:21:33 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-8549039f.us-west-2.amazon.com (Postfix) with ESMTPS id 63606A1BCD; Wed, 21 Aug 2019 08:21:33 +0000 (UTC) Received: from EX13D05EUB004.ant.amazon.com (10.43.166.115) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 21 Aug 2019 08:21:17 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D05EUB004.ant.amazon.com (10.43.166.115) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 21 Aug 2019 08:21:17 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 21 Aug 2019 08:21:15 +0000 From: Pawel Wieczorkiewicz To: Date: Wed, 21 Aug 2019 08:20:43 +0000 Message-ID: <20190821082056.91090-8-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 In-Reply-To: <20190821082056.91090-1-wipawel@amazon.de> References: <20190821082056.91090-1-wipawel@amazon.de> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH 07/20] create-diff-object: Add is_special_section() helper function X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: wipawel@amazon.com, Konrad Rzeszutek Wilk , Andrew Cooper , Ross Lagerwall , mpohlack@amazon.com, Pawel Wieczorkiewicz Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This function determines, based on the given section name, if the sections belongs to the special sections category. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey Reviewed-by: Ross Lagerwall --- create-diff-object.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/create-diff-object.c b/create-diff-object.c index 4699ba0..0df3fea 100644 --- a/create-diff-object.c +++ b/create-diff-object.c @@ -1045,6 +1045,18 @@ static struct special_section special_sections[] = { {}, }; +static int is_special_section(const struct section *sec) +{ + struct special_section *special; + + for (special = special_sections; special->name; special++) { + if (!strcmp(sec->name, special->name)) + return true; + } + + return false; +} + static int should_keep_rela_group(struct section *sec, int start, int size) { struct rela *rela;