From: Jonathan Creekmore Subject: Re: [PATCH 4/4] sched: Use the auto-generated list of schedulers Date: Fri, 18 Dec 2015 11:24:27 -0600 Message-ID: <1F59ABD7-C8E2-4B0A-88C9-B9D8DAFCA2DA@gmail.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> <567445CE02000078000C1645@prv-mh.provo.novell.com> Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9yla-0003Vz-W1 for xen-devel@lists.xenproject.org; Fri, 18 Dec 2015 17:24:31 +0000 Received: by mail-yk0-f182.google.com with SMTP id x184so65923855yka.3 for ; Fri, 18 Dec 2015 09:24:29 -0800 (PST) In-Reply-To: <567445CE02000078000C1645@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 , xen-devel@lists.xenproject.org, Dario Faggioli List-Id: xen-devel@lists.xenproject.org > On Dec 18, 2015, at 10:43 AM, Jan Beulich wrote: > >>>> 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. > Well, I would prefer not to delve into undocumented behavior in what should be a fairly straightforward patch set, so I plan on keeping the use of the __start and __stop symbols.