From patchwork Fri Jun 24 09:29:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9197135 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 ADA4F6075F for ; Fri, 24 Jun 2016 09:31:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99A9628498 for ; Fri, 24 Jun 2016 09:31:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BA2D2849E; Fri, 24 Jun 2016 09:31:27 +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 28F3F28498 for ; Fri, 24 Jun 2016 09:31:27 +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 1bGNQC-0006n3-Tm; Fri, 24 Jun 2016 09:29:08 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGNQB-0006mx-Am for xen-devel@lists.xenproject.org; Fri, 24 Jun 2016 09:29:07 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 67/41-20705-26DFC675; Fri, 24 Jun 2016 09:29:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRWlGSWpSXmKPExsXS6fjDSzfxb06 4wd+dRhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8apE59ZCxYIV3zq7GNpYHwk0MXIwSEkkCcx dWluFyMnB6+AncTjtf+ZQWwJAUOJffNXsYGUsAioStxYmgISZhNQl2h7tp0VJCwiYCBx7mhSF yMXB7PAWiaJi7PuMoHUCAvoSzT+fsUGkhAS2MAocXRnGyNIghNo/pd3M5lBmnkFBCX+7hAGCT MDhd+2rmKewMgzCyEzC0kGwtaSePjrFguErS2xbOFrZpByZgFpieX/OCBMO4nfyypRVYDYnhL nds5gXcDIsYpRvTi1qCy1SNdCL6koMz2jJDcxM0fX0MBYLze1uDgxPTUnMalYLzk/dxMjMFAZ gGAH44V250OMkhxMSqK80xblhAvxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4P30GygnWJSanlqRl pkDjBmYtAQHj5IIRJq3uCAxtzgzHSJ1ilFRSpz3B0hCACSRUZoH1waL00uMslLCvIxAhwjxFK QW5WaWoMq/YhTnYFQS5v0LMoUnM68EbvoroMVMQIvv9meDLC5JREhJNTD6rvKpy642KHcSPMF /Smkm9243PZu0bOs248St2+Y6NNbOMo57pTfRddvJg2VCXrnzJm17v+NY/JLzi913P3rZX3pC XKhysRDXZdXtDnkVdmYrLi1Y/oyVzWHF6nU2b31XcD8WW+ytIn/0yoN1nZePX659vLFt333tg hvvDzvcUIx33duq4ZGmxFKckWioxVxUnAgA2SCeQs4CAAA= X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1466760543!43032225!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 64489 invoked from network); 24 Jun 2016 09:29:05 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 24 Jun 2016 09:29:05 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Fri, 24 Jun 2016 03:29:03 -0600 Message-Id: <576D197F02000078000F8687@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Fri, 24 Jun 2016 03:29:03 -0600 From: "Jan Beulich" To: "xen-devel" References: <1466528345-22235-1-git-send-email-andrew.cooper3@citrix.com> <576C23DB02000078000F83E2@prv-mh.provo.novell.com> <183f6c1e-7f32-0c53-d843-0a33a4e6485e@citrix.com> In-Reply-To: <183f6c1e-7f32-0c53-d843-0a33a4e6485e@citrix.com> Mime-Version: 1.0 Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan Subject: [Xen-devel] [PATCH] init: fix build with older gcc 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 __setup_str is used on arrays of char, so there aren't any relocatable items. Hence __initconst has to be used here, not __initconstrel. Whatever led to the revert of commit 59b151d2c0 (the original version of a6066af5b1 "xen/init: Annotate all command line parameter infrastructure as const" must have got addressed meanwhile - with the patch here I can't see that old gcc (4.3ish) report a section type conflict anymore. Signed-off-by: Jan Beulich init: fix build with older gcc __setup_str is used on arrays of char, so there aren't any relocatable items. Hence __initconst has to be used here, not __initconstrel. Whatever led to the revert of commit 59b151d2c0 (the original version of a6066af5b1 "xen/init: Annotate all command line parameter infrastructure as const" must have got addressed meanwhile - with the patch here I can't see that old gcc (4.3ish) report a section type conflict anymore. Signed-off-by: Jan Beulich --- a/xen/include/xen/init.h +++ b/xen/include/xen/init.h @@ -88,7 +88,7 @@ struct kernel_param { extern const struct kernel_param __setup_start[], __setup_end[]; -#define __setup_str static const __initconstrel \ +#define __setup_str static const __initconst \ __attribute__((__aligned__(1))) char #define __kparam static const __initsetup \ __attribute__((__aligned__(sizeof(void *)))) struct kernel_param Acked-by: Andrew Cooper --- a/xen/include/xen/init.h +++ b/xen/include/xen/init.h @@ -88,7 +88,7 @@ struct kernel_param { extern const struct kernel_param __setup_start[], __setup_end[]; -#define __setup_str static const __initconstrel \ +#define __setup_str static const __initconst \ __attribute__((__aligned__(1))) char #define __kparam static const __initsetup \ __attribute__((__aligned__(sizeof(void *)))) struct kernel_param