From: "Jan Beulich" Subject: Re: [PATCH 4/4] sched: Use the auto-generated list of schedulers Date: Fri, 18 Dec 2015 09:43:42 -0700 Message-ID: <567445CE02000078000C1645@prv-mh.provo.novell.com> References: <1450385974-12732-1-git-send-email-jonathan.creekmore@gmail.com> <1450385974-12732-5-git-send-email-jonathan.creekmore@gmail.com> <5673F2EF02000078000C1194@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9y8A-0006nN-12 for xen-devel@lists.xenproject.org; Fri, 18 Dec 2015 16:43:46 +0000 In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jonathan Creekmore Cc: George Dunlap , xen-devel@lists.xenproject.org, Dario Faggioli List-Id: xen-devel@lists.xenproject.org >>> On 18.12.15 at 17:00, wrote: > Jan Beulich writes: >>>>> On 17.12.15 at 21:59, wrote: >>> +extern const struct scheduler *__schedulers_start[], *__schedulers_end[]; >>> +#define NUM_SCHEDULERS > (((uintptr_t)__schedulers_end-(uintptr_t)__schedulers_start) \ >>> + / sizeof(struct scheduler *)) >>> +static const struct scheduler **schedulers = __schedulers_start; >> >> I really wonder whether we should continue follow this route of >> __start_ / __stop_ symbols, instead of leveraging gas+ld's >> .startof. and .sizeof. operators. > > So, I would love to explore using those operators if you can give me > some link to documentation for using them. I have yet to be able to find > a construct for LD and GCC that works correctly for generating > equivalent symbols. With binutils docs missing any notion of these, I can only refer you to binutils sources, I'm afraid. Jan