From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Creekmore Subject: Re: [PATCH 4/4] sched: Use the auto-generated list of schedulers Date: Fri, 18 Dec 2015 10:00:06 -0600 Message-ID: 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.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9xSP-0002HF-T8 for xen-devel@lists.xenproject.org; Fri, 18 Dec 2015 16:00:38 +0000 Received: by mail-yk0-f181.google.com with SMTP id 140so62391093ykp.0 for ; Fri, 18 Dec 2015 08:00:36 -0800 (PST) In-reply-to: <5673F2EF02000078000C1194@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: George Dunlap , Jonathan Creekmore , Dario Faggioli , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org 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.