From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17344 invoked by alias); 8 Nov 2002 02:30:03 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 17313 invoked from network); 8 Nov 2002 02:30:01 -0000 Received: from unknown (HELO deimos.hpl.hp.com) (192.6.19.190) by sources.redhat.com with SMTP; 8 Nov 2002 02:30:01 -0000 Received: from hplms2.hpl.hp.com (hplms2.hpl.hp.com [15.0.152.33]) by deimos.hpl.hp.com (8.9.3 (PHNE_24419)/HPL-PA Relay) with ESMTP id SAA27038; Thu, 7 Nov 2002 18:30:00 -0800 (PST) Received: from napali.hpl.hp.com (napali.hpl.hp.com [15.4.89.123]) by hplms2.hpl.hp.com (8.10.2/8.10.2 HPL-PA Hub) with ESMTP id gA82TxL09474; Thu, 7 Nov 2002 18:29:59 -0800 (PST) Received: from napali.hpl.hp.com (napali [127.0.0.1]) by napali.hpl.hp.com (8.12.3/8.12.3/Debian -4) with ESMTP id gA82TxHW025011; Thu, 7 Nov 2002 18:29:59 -0800 Received: (from davidm@localhost) by napali.hpl.hp.com (8.12.3/8.12.3/Debian -4) id gA82TxeQ025007; Thu, 7 Nov 2002 18:29:59 -0800 From: David Mosberger MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15819.8615.381885.43905@napali.hpl.hp.com> Date: Thu, 07 Nov 2002 18:30:00 -0000 To: Roland McGrath Cc: Richard Henderson , davidm@hpl.hp.com, libc-hacker@sources.redhat.com, hjl@lucon.org Subject: Re: patch to make init_array work (2nd version; resend) In-Reply-To: <200211080220.gA82K9W32164@magilla.sf.frob.com> References: <20021107181034.B4047@twiddle.net> <200211080220.gA82K9W32164@magilla.sf.frob.com> Reply-To: davidm@hpl.hp.com X-SW-Source: 2002-11/txt/msg00036.txt.bz2 >>>>> On Thu, 7 Nov 2002 18:20:09 -0800, Roland McGrath said: >> On Thu, Nov 07, 2002 at 01:58:52PM -0800, Roland McGrath wrote: > >> That seems like a reasonable thing to do, though it's unfortunate >> it means > changing all the platforms' start.S files. For >> preinit_array+init_array, > start.S could just contain the code >> in the .init section, no? But probably > it is better to write >> generic _init/_fini replacements in C. >> >> I think the best solution is to write >> >> static void do_all_init(void) { // Loop over .preinit_array // >> Loop over .init_array _init (); } >> >> or whatever the proper ordering is, and then pass this new >> function to __libc_start_main. Roland> Yup, that's the C I was talking about. I suppose it makes sense to put do_all_init() and do_all_fini() in a shared source file. Do you want to do that or should I work on it? If the latter, just tell me where you want the functions. --david