# bootstrap Module This module implements automatic service initialization. That is, the initialization function does not need to be explicitly called. Instead, it is declared using the macro definition and is automatically executed when the system is started. Specifically, after the function for starting a service is declared using a macro, it is placed in the predefined **zInit** code segment. During system startup, the **OHOS\_SystemInit** API is called to traverse the code segment and call the functions in the code segment. Therefore, you need to include the **zInit** code segment in the linker script and call the **OHOS\_SystemInit** API in the **main** function. For details about how to include the **zInit** code segment, see the Hi3861 linker script in **vendor/hisi/hi3861/hi3861/build/link/link.ld.S**. For details about the macros used by the bootstrap module to implement automatic service initialization, see [API document](https://device.harmonyos.com/en/docs/develop/apiref/init-0000001054598113) the Startup subsystem. ## Available APIs The following table describes the major macros used by the bootstrap module to implement automatic service initialization. **Table 1** Major macros for the bootstrap module
Entry for initializing and starting an application-layer service |
|
Entry for initializing and starting an application-layer feature |