patch to make init_array work (2nd version; resend)

Richard Henderson rth@twiddle.net
Thu Nov 7 18:10:00 GMT 2002


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.


r~



More information about the Libc-hacker mailing list