From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 714 invoked by alias); 26 Mar 2008 19:07:15 -0000 Received: (qmail 614 invoked by uid 22791); 26 Mar 2008 19:07:15 -0000 X-Spam-Check-By: sourceware.org Received: from mgcp1.bloomberg.com (HELO mgcp1.bloomberg.com) (208.22.56.39) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Mar 2008 19:06:53 +0000 Received: from ny1520.bloomberg.com ([10.16.11.97]) by mgcp1.bloomberg.com with ESMTP; 26 Mar 2008 15:06:52 -0400 Received: from NY2528-DR.corp.bloomberg.com (ny2528-dr.corp.bloomberg.com [10.14.21.30]) by ny1520.bloomberg.com (8.14.1/8.14.1) with ESMTP id m2QJ6jAK006376; Wed, 26 Mar 2008 15:06:45 -0400 Received: from ny2545.corp.bloomberg.com ([172.20.73.98]) by NY2528-DR.corp.bloomberg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 26 Mar 2008 15:06:45 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 26 Mar 2008 19:10:00 -0000 Message-ID: In-Reply-To: <20080326185037.GD5705@lunn.ch> References: <20080326180616.GA5705@lunn.ch> <20080326181817.GB5705@lunn.ch> <20080326183202.GC5705@lunn.ch> <20080326185037.GD5705@lunn.ch> From: "Chris Zimman" To: "Andrew Lunn" Cc: X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: RE: [ECOS] ARM EABI port / static constructor priority removal X-SW-Source: 2008-03/txt/msg00162.txt.bz2 > Also ugly. You break the nice packing model. Say i have an out of tree > package, a device driver for the wall clock on my hardware. The > current code allows my code to have a static initializer with priority > that is after I2C is up and running and it is totally independent of > the in tree code. I don't need to modify the in tree code at all. The > linker sorts it all out. Your suggestion would force me to modify the > in tree list of constructors. With what you're talking about here, you'd have to modify cyg_type.h anyway if you want to add a new init priority unless you want to keep it private, which is kind of bogus. With the current model anyhow, you *have* to be aware of the ordering in cyg_type.h and known what values are assigned to which constructors. That's pretty ugly in and of itself. There's also no inherent reason you would have to modify in tree code to accomplish what you're suggesting. Sections can be created for just that purpose. Even enforcing startup ordering rules is pretty straight forward that way. =20 > The same could be said for application code. My application wants a > static constructor called after the OS is up an running, but before > main() is called. Should i modify the OS to list my application > constructors? It's not about the use of static constructors in general, it's about relying on non-portable behavior with respect to using them (construction ordering). --Chris -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss