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
On Sun, Mar 20, 2005 at 05:30:27PM -0800, H. J. Lu wrote:
> You can call it .foo instead of .ctors. If you want to keep the same
> order between
>
> static void init (void) __attribute__ ((constructor));
> void (*const init_array []) (void) __attribute__ ((section (".init_array")))
>
> you can use .foo and .init_array to implement ctors in such a way that
>
> static void init (void) __attribute__ ((constructor));
>
> will run before
>
> void (*const init_array []) (void) __attribute__ ((section (".init_array")))
>
> I don't believe it will affect the ABI conformance.
Where do you propose to invoke .foo from? ABI conformant objects must
work without GCC's crtstuff.c - that's the whole point of conformance.
--
Daniel Jacobowitz
CodeSourcery, LLC