diff --git a/en/application-dev/reference/native-lib/third_party_libc/musl-peculiar-symbol.md b/en/application-dev/reference/native-lib/third_party_libc/musl-peculiar-symbol.md index fb04373e8259db189a558efa722dbeb343bcf413..8bf719c5413ec4604ee973eefda858d230459397 100644 --- a/en/application-dev/reference/native-lib/third_party_libc/musl-peculiar-symbol.md +++ b/en/application-dev/reference/native-lib/third_party_libc/musl-peculiar-symbol.md @@ -1,4 +1,4 @@ -# libc Symbols Not Exported +# Native API Symbols Not Exported |Type|Symbol|Remarks| | --- | --- | --- | diff --git a/en/application-dev/reference/native-lib/third_party_libc/musl-permission-control-symbol.md b/en/application-dev/reference/native-lib/third_party_libc/musl-permission-control-symbol.md index 83ccf5a885735cee2663d0b4e20609f46dc81446..91c73bc25c943c48bf7879ab0440ad5bc651451d 100644 --- a/en/application-dev/reference/native-lib/third_party_libc/musl-permission-control-symbol.md +++ b/en/application-dev/reference/native-lib/third_party_libc/musl-permission-control-symbol.md @@ -1,4 +1,4 @@ -# libc Symbols That May Fail to Call Due to Permission Control +# Native API Symbols That May Fail to Call Due to Permission Control Before using the following interfaces, ensure that the application entity has the corresponding permission. diff --git a/en/application-dev/reference/native-lib/third_party_libc/musl.md b/en/application-dev/reference/native-lib/third_party_libc/musl.md index 3474196fdd04bcfb4f8ed53612e8f0a75c5723b1..8ff5d3915c61e81b97a84c222f8206550c97e541 100644 --- a/en/application-dev/reference/native-lib/third_party_libc/musl.md +++ b/en/application-dev/reference/native-lib/third_party_libc/musl.md @@ -11,17 +11,19 @@ For details about the differences between musl and glibc, see [Functional differ C11 is implemented by [libc, libm, and libdl](https://en.cppreference.com/w/c/header). -libc: provides thread-related interfaces and a majority of standard interfaces. +- libc: provides thread-related interfaces and a majority of standard interfaces. -libm: provides mathematical library interfaces. Currently, OpenHarmony provides a link to libm, and the interfaces are defined in libc. -libdl: provides dynamic linker interfaces such as dlopen. Currently, OpenHarmony provides a link to libdl, and the interfaces are defined in libc. +- libm: provides mathematical library interfaces. Currently, OpenHarmony provides a link to libm, and the interfaces are defined in libc. + +- libdl: provides dynamic linker interfaces such as dlopen. Currently, OpenHarmony provides a link to libdl, and the interfaces are defined in libc. + ## musl Version 1.2.0 -From OpenHarmony 4.0, musl 1.2.3 is supported. +OpenHarmony 4.0 supports musl 1.2.3. ## Supported Capabilities OpenHarmony provides header files and library interfaces that are compatible (not fully compatible) with C99, C11, and POSIX, and supports Armv7-A, Arm64, and x86_64 architectures. @@ -35,32 +37,36 @@ To better adapt to the basic features of OpenHarmony devices, such as high perfo 4. **dlopen()** can directly load uncompressed files in a .zip package. ### Debugging Capabilities -The libc provides dynamic settings of the basic log functions (disabled by default) for developers to view internal exceptions of the libc. You can set the **param** to enable or disable the log functions, without recompiling the libc. However, you are advised not to use the log functions in official release versions because they affect the running performance. +The libc provides dynamic enabling of debug logging (disabled by default). The debug logs help you learn about exceptions of the libc. With this function, you only need to set **param**, which eliminates the need for rebuilding the libc. However, you are advised not to enable debug logging in official versions because it affects the running performance. #### 1. musl.log -Set **musl.log.enable** to **true** to enable the **musl.log** function. To print other logs, you need to enable this function first. +Set **musl.log.enable** to **true** to enable printing of musl debug logs. You need to enable musl.log before printing other logs. ``` -setparam musl.log.enable true +param set musl.log.enable true ``` -#### 2. Loader log function -The loader starts applications and invokes dlopen() and dlclose() in libc. To view exceptions in the dynamic loading process, enable the loader log function. -* Enable the loader log of all applications (exercise caution when using this function). +#### 2. Loader logging +The loader starts applications and invokes **dlopen** and **dlclose** in the libc. To view exceptions during the loading process, you need to enable the loader logging function. The following describes common operations. +* Enable the loader logging for all applications. Exercise caution when enabling this function because a large number of logs will be generated. ``` param set musl.log.ld.app true ``` -* Enable the loader log of the specified application. {app_name} specifies the target application. +* Enable the loader logging for an application specified by {app_name}. ``` param set musl.log.ld.all false param set musl.log.ld.app.{app_name} true ``` -* Enable the loader log of all applications except the specified application. +* Enable the loader logging for all applications except the specified application. ``` param set musl.log.ld.all true param set musl.log.ld.app.{app_name} false ``` ## Interfaces Not Supported by musl -[libc Symbols Not Exported](musl-peculiar-symbol.md) -[libc Symbols That May Fail to Call Due to Permission Control](musl-permission-control-symbol.md) + +[Native API Symbols Not Exported](musl-peculiar-symbol.md) + +[Native API Symbols That May Fail to Call Due to Permission Control](musl-permission-control-symbol.md) + +