This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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 to make init_array work (2nd version; resend)


> 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.

Yup, that's the C I was talking about.


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