Blame sysdeps/init_array/crti.S

Packit 6c4009
/* Dummy crti file.
Packit 6c4009
Packit 6c4009
   In this configuration, crti.o and crtn.o are both empty because the
Packit 6c4009
   .init_array/.fini_array sections are used exclusively.
Packit 6c4009
Packit 6c4009
   Older ports cannot use this because even if the linker used to
Packit 6c4009
   build libc itself has .init_array support, we don't want to produce
Packit 6c4009
   a crt[in].o that presume a linker that new will be used to link
Packit 6c4009
   other things later.
Packit 6c4009
Packit 6c4009
   But new configurations without compatibility concerns for
Packit 6c4009
   toolchains without .init_array support can use this to avoid the
Packit 6c4009
   superfluous .init and .fini boilerplate code.  */
Packit 6c4009
Packit 6c4009
#ifdef PREINIT_FUNCTION
Packit 6c4009
Packit 6c4009
#if PREINIT_FUNCTION_WEAK
Packit 6c4009
# error PREINIT_FUNCTION_WEAK is unsupported
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* This arranges for PREINIT_FUNCTION to be called upon loading a library that
Packit 6c4009
   contains crti.o.  */
Packit 6c4009
Packit 6c4009
	.section .init_array,"a",%init_array
Packit 6c4009
	.dc.a PREINIT_FUNCTION
Packit 6c4009
Packit 6c4009
#endif