This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Use .init_arrat/.fini_array if available


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]