This is the mail archive of the gcc@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: Constructor order help (related to PR 6482)


> On Thu, Apr 10, 2003 at 04:51:39PM -0700, Kean Johnston wrote:
> > It also has support for
> > an array of init and fini functions (and the RTLD supports
> > them too), so I guess this is how we could order constructors.
> 
> Via DT_INIT_ARRAY, I assume?  Yes, this is the Ideal Solution.
> 
> Currently this is implemented for ia64-linux, but noone else.
> As DT_INIT_ARRAY is supportedn by more deployed dynamic linkers,
> this should be supported on more targets.

On 3.3 and later, we support this under hppa64-hpux.  This was
the only way that I could see to support running initializers and
finalizers in a manner that was compatible with both the HP and
GNU linkers.  This is done with a horrible set of macros and crtstuff.c.
Probably, I should write a hppa64 specific version of crtstuff but
I wanted to be sure the basics were ok.  I believe that things
run in the right order at the moment but the HP dynamic loader
runs the arrays of init and fini functions in reverse order to
ELF spec.

Dave
-- 
J. David Anglin                                  dave dot anglin at nrc-cnrc dot gc dot ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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