This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
crt{begin,end}.o and __do_global_{c,d}tors_aux
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 7 Jun 2003 13:52:56 +0930
- Subject: crt{begin,end}.o and __do_global_{c,d}tors_aux
Can someone tell me why on ELF system, crtbegin.o defines
__do_global_dtors_aux and crtend.o defines __do_global_ctors_aux, and
not the other way around? Is it just so that the calls from _fini and
_init respectively are to static functions?
The reason I'm asking is that this arrangement means that the calls go
from one end of the app to the other, which isn't ideal for targets
having limited branch range.
--
Alan Modra
IBM OzLabs - Linux Technology Centre