Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
crt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRT_HAS_INITFINI_ARRAY
 

Functions

void CRTStartup (void)
 
void __libc_init_array (void)
 
void __libc_fini_array (void)
 

Macro Definition Documentation

◆ CRT_HAS_INITFINI_ARRAY

#define CRT_HAS_INITFINI_ARRAY

Definition at line 4 of file crt.h.

Function Documentation

◆ __libc_fini_array()

void __libc_fini_array ( void  )

Definition at line 30 of file crt.c.

31 {
32  size_t count = __fini_array_end - __fini_array_start;
33  for(size_t i = count - 1; i > 0; i--)
34  {
35  __fini_array_start[i]();
36  }
37 }

◆ __libc_init_array()

void __libc_init_array ( void  )

Referenced by CRTStartup().

◆ CRTStartup()

void CRTStartup ( void  )

Definition at line 39 of file crt.c.

40 {
41  memset(&__bss_start__, 0, (uintptr_t)&__bss_end__ - (uintptr_t)&__bss_start__);
42 
44 
45  // TODO: handle relocs?
46 }
int __bss_end__
void * memset(void *dest, int c, size_t n)
Copies the value c into each of the first n characters of the object pointed to by dest.
void __libc_init_array(void)
int __bss_start__

References __bss_end__, __bss_start__, __libc_init_array(), and memset().