Constructor order help (related to PR 6482)
Kean Johnston
jkj@sco.com
Fri Apr 11 01:31:00 GMT 2003
> > 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.
Yup exactly. Wow OSR5, as crufty as it is, has *SOME* thing
that's ideal. Wow :)
> 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.
The bulk of your mail pointed me to the way the Linux x86 folks
do things, and I can certainly craft up sco5.h to play that way,
but, in light of the above, would it be better (a hard quality
to objectively define, I know) to get things working the IA64
way? The link editor and the RTLD both support it, so my knee-jerk
answer to my own question is "yes". But I may be signing myself
up for more than I bargained for :)
> (1) OBJECT_FORMAT_ELF defined in config/elfos.h.
yup sco5.h now used elfos.h
> (2) Neither CTOR_LIST_BEGIN nor CTORS_SECTION_ASM_OP defined,
> which results in the default version of __CTOR_LIST__.
That was probably my problem. CTORS_SECTION_ASM_OP was defined.
Likewise DTTORS_SECTION_ASM_OP. I'll remove them now.
> It may be worth your while to look at the Irix configury,
> which is also implemented via linker command line switches,
> rather than magic section names.
I shall do so, thank you Richard.
Kean
More information about the Gcc
mailing list