From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11882 invoked by alias); 27 Nov 2002 23:34:22 -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 11864 invoked from network); 27 Nov 2002 23:34:22 -0000 Received: from unknown (HELO deimos.hpl.hp.com) (192.6.19.190) by sources.redhat.com with SMTP; 27 Nov 2002 23:34:22 -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 PAA01365; Wed, 27 Nov 2002 15:34:21 -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 gARNYJs06612; Wed, 27 Nov 2002 15:34:20 -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 gARNYJKu032388; Wed, 27 Nov 2002 15:34:19 -0800 Received: (from davidm@localhost) by napali.hpl.hp.com (8.12.3/8.12.3/Debian -4) id gARNYJHq032384; Wed, 27 Nov 2002 15:34:19 -0800 From: David Mosberger MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15845.22139.286152.270593@napali.hpl.hp.com> Date: Wed, 27 Nov 2002 15:34:00 -0000 To: "H. J. Lu" Cc: davidm@hpl.hp.com, Roland McGrath , libc-hacker@sources.redhat.com Subject: Re: patch to make init_array work (3nd version) In-Reply-To: <20021127150958.A15921@lucon.org> References: <200211081934.gA8JYVB05781@magilla.sf.frob.com> <15845.18613.38095.974630@napali.hpl.hp.com> <20021127150958.A15921@lucon.org> Reply-To: davidm@hpl.hp.com X-SW-Source: 2002-11/txt/msg00070.txt.bz2 >>>>> On Wed, 27 Nov 2002 15:09:58 -0800, "H. J. Lu" said: HJ> I am not sure how this approach will work. If I get it right, HJ> __libc_do_init_calls and __libc_do_fini_calls are defined in HJ> executables. But they are only available when executables are HJ> linked against with the new glibc. For the existing executables, HJ> there are no __libc_do_init_calls nor __libc_do_fini_calls. That HJ> is why my original solution has Old executables directly pass _init() and _fini() to __libc_start_main, so they'll work normally. Of course, the preinit_array, init_array, and fini_array in such executables won't be executed either, but since this support is new, those binaries presumably don't have such sections. Also, ld.so should take care of executing init_array and fini_array for the shared objects that the executable depends on, so I think everything should be fine. --david