Blame sysdeps/init_array/crti.S

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