This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Use .init_arrat/.fini_array if available
- From: Daniel Jacobowitz <drow at false dot org>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: Paul Brook <paul at codesourcery dot com>,Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 20 Mar 2005 10:34:58 -0500
- Subject: Re: PATCH: Use .init_arrat/.fini_array if available
- References: <20050319192550.GA27423@nevyn.them.org> <20050320060548.GB29959@lucon.org>
On Sat, Mar 19, 2005 at 10:05:48PM -0800, H. J. Lu wrote:
> > As far as I can tell, this is a conforming implementation of
> > __attribute__((constructor)); even a desirable one. Any suggestions on how
> > to adapt the tests for this implementation?
> >
>
> This is the patch for gcc 3.4. It is very similar to Linux/ia64 port,
> which is in assembly. It works for me. Glibc calls functions in
> .init_array like main (). That is what INIT_ARRAY_LIKE_MAIN is used
> for. Linux developers can take advantage of it. I haven't come up with
> a better way to check it.
I'm not following you. How does this patch relate to the problem I
described?
>
>
> H.J.
> ------
> 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
>
> * config/linux.h (INIT_ARRAY_LIKE_MAIN): Defined.
>
> * crtstuff.c: If HAVE_INITFINI_ARRAY is defined, use
> .init_array/.fini_array sections instead of .init/.fini
> sections.
How far back does glibc support this?
--
Daniel Jacobowitz
CodeSourcery, LLC