This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: making naked attr generally available
On Wed, Jun 02, 1999 at 05:22:50PM +1200, Bill Currie wrote:
> Good point, but what about targets that *DON'T* support DT_INIT_ARRAY?
There are two (ELF) types -- (1) those that use gcc as the native
compiler, (2) those that have a crt[in].o from the native system.
The COFF systems using crtstuff I count in (1), since the system
provides no native support at all.
In the case of (1), we should write the _init and _fini functions
to process .ctors and .dtors as one unit. There should be no
crt[in].o as such. The _init function should not be put together
in parts. We should force people to use GCC's constructor mechanism,
ie put function pointers in .ctors.
In the case of (2), we should write a bit of assembly. There are
not that many such systems -- only AT&T SVR4 derivitives come to
mind. Does that encompas more than i386 and sparc? Probably not.
> "Use at your own risk!" does it for me. *NO* low level coding is
> suitable for the newbie. They either sink or swim.
Oh yeah, that'll work well. It's not the newbie that bothers me.
We have way too many poorly thought out and defined extensions in
GCC as it is. I have no desire to add another.
r~