crti.S 840 B

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