This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: making naked attr generally available
Richard Henderson wrote:
> And guess what -- later ELF revisions added DT_INIT_ARRAY so that
> there would be no need to glom function parts together like that.
> On targets that support DT_INIT_ARRAY, we can directly support
> .ctors without a __do_global_ctors_aux function, and without all
> the .init/.fini grossness you mention.
Good point, but what about targets that *DON'T* support DT_INIT_ARRAY?
.init/.fini may have been a mistake in the design of ELF (from the
compiler POV), but it's there now, and it *IS* nicer to be able to code
(cleanly) in C rather than using dirty hacks (I'm not counting naked as
dirty for this discussion, it's at least better).
> I have strong reservations about turning such a feature loose.
> There is no way we can explain how you can and cannot use the
> feature. Code _will_ break from one compiler rev to the next.
"Use at your own risk!" does it for me. *NO* low level coding is
suitable for the newbie. They either sink or swim. No point in holding
their hand, otherwise they'll just pull us down with them.
Bill
--
Leave others their otherness