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 Sun, Mar 20, 2005 at 08:35:00PM -0500, Daniel Jacobowitz wrote:
> 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.
> 

I see. I assume that your ABI covers __dso_handle. Is .init_array
enabled for all Linux targets where its support is available?


H.J.


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